Overcommit and ephemeral storage
Overcommit is a capacity decision
A node advertises 2000m CPU allocatable. Three Pods each request 500m CPU and declare a limit of 1000m. Their aggregate request is 1500m, so they fit the CPU dimension; the aggregate limits are 3000m. If all three become busy, their maximum desired CPU use exceeds available CPU. They compete for CPU, and runtime limits or scheduling shares can affect throughput and latency. This is overcommit in a simple model, not an assurance of any specific allocation. Memory demand above requests is riskier: insufficient memory can lead to kills or eviction. Always examine memory and other constraints separately.
Effective requests include initialization
For the container-level model, calculate each resource independently. Suppose a regular app requests 400m CPU, a native sidecar requests 100m, and an ordinary init container listed after that sidecar requests 700m. During initialization the two overlap at 800m; during steady operation the app and sidecar sum to 500m. With 20m Pod overhead, effective CPU request is 820m. If the ordinary init container appears first, the init peak is 700m and the effective result is 720m. This assumes native sidecar support (stable from v1.33), overhead supplied by the runtime configuration, no Pod-level resource budgets and no other containers. Memory uses the same phase-based calculation independently. Limits have additional missing-limit rules; do not treat an omitted limit as zero.
Know what local ephemeral storage includes
Local scratch space, writable container layers and container logs consume node storage. Disk-backed emptyDir data usually survives a container restart in the same Pod but disappears when the Pod is removed from the node. A memory-backed emptyDir consumes memory rather than local disk storage accounting. Storage requests guide placement when supported; local storage limits can trigger eviction when monitored usage exceeds them, not necessarily an immediate write error. Filesystem layout, runtime and kubelet monitoring determine what is measured. Persistent volumes are a separate topic.
Give temporary files explicit bounds
This static manifest illustrates a 100Mi ephemeral-storage request, 300Mi container limit and 200Mi disk-backed scratch sizeLimit. It is intentionally not deployable: the image cannot be pulled. The volume bound does not replace the Pod storage budget. Suppose scratch contains 180Mi and the container has 130Mi of logs and writable-layer data: scratch is below 200Mi, but total usage is 310Mi, above the single-container Pod storage budget. With supported accounting this is a candidate for eviction. Exact detection and timing depend on the kubelet; do not fill a real disk to reproduce it.
apiVersion: v1kind: Podmetadata: name: catalog-cache namespace: resource-studyspec: automountServiceAccountToken: false restartPolicy: Never activeDeadlineSeconds: 120 securityContext: runAsNonRoot: true runAsUser: 10001 seccompProfile: type: RuntimeDefault containers: - name: cache image: example.invalid/bytemind/cache:offline resources: requests: cpu: 250m memory: 128Mi ephemeral-storage: 100Mi limits: cpu: 500m memory: 256Mi ephemeral-storage: 300Mi securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: [ALL] volumeMounts: - name: scratch mountPath: /scratch volumes: - name: scratch emptyDir: sizeLimit: 200MiExtended resources are not ordinary burst capacity
A device plugin can advertise an integer resource such as lab.example/accelerator. If a node has two units and assigned workloads request both, a third one-unit request cannot fit that dimension. Extended resources cannot be overcommitted; if both request and limit are specified they must agree. This is a hypothetical device name, not a claim that hardware exists. A namespace quota for an extended resource can cap requests without making a device available. Separately, a disk-pressure condition may trigger eviction even if a particular Pod is below its declared storage limit.
Practice
Use capacity-cases.json and storage-cases.json to work out resource fit and disk totals. Verify MiB units instead of confusing Mi with m. Explain why a quota acceptance, a passing CPU fit test and a healthy node are different outcomes. Do not run stress tools; all calculations use fixed values.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Overcommit and ephemeral storage — knowledge check
Apply resource-management concepts to offline scenarios.
Three Pods request 500m each and have limits of 1000m each. What is their CPU request sum?
A 100m sidecar precedes a 700m init; the app requests 400m and overhead is 20m. Effective CPU request?
Which storage is charged as memory rather than local disk ephemeral storage?
Scratch uses 180Mi and logs/layer use 130Mi; Pod storage limit is 300Mi. What does the simplified model show?
An extended resource has 2 advertised units and 2 requested. Can a new one-unit request fit?