Blueprint: Resource Management

Proper resource management is the foundation of pod stability. Setting CPU and memory `requests` and `limits` tells the Kubernetes scheduler how to place pods and tells the `kubelet` how to prioritize them, directly determining their QoS class.

Configuring Requests and Limits

Not setting requests and limits is a major anti-pattern, as it results in your workload being classified as `BestEffort` and being the first to be terminated under pressure.

Guaranteed QoS Configuration

Set requests and limits to the exact same value. This is for your most critical workloads.

resources:
  requests:
    memory: "1Gi"
    cpu: "1"
  limits:
    memory: "1Gi"
    cpu: "1"

Burstable QoS Configuration

Set limits higher than requests. This is for general-purpose apps that can benefit from using spare node capacity.

resources:
  requests:
    memory: "256Mi"
    cpu: "200m"
  limits:
    memory: "512Mi"
    cpu: "1"

BestEffort QoS Configuration

Omit all requests and limits. Only use this for non-critical, low-priority tasks that can be safely terminated.

resources: {}