Skip to main content
InterviewHubPRO
Section Overview
Q32

Question 32 of 50

Part 3: Advanced Internals, Scale & Production Security (Senior / Lead)

64%
Kubernetes (K8s) (50 Qs)•Part 3: Advanced Internals, Scale & Production Security (Senior / Lead)

Handling Ephemeral Storage Evictions.

senior LevelMost AskedCode ExampleSecurity & Auth

In Simple Words: Pods write logs, build artifacts, and scratch data to /var/lib/kubelet/pods/<id> on the host disk:

  • If a pod writes a runaway 20GB log file without constraints, the host node disk hits 85% utilization, triggering DiskPressure.
  • Kubelet begins evicting Pods randomly!
  • Solution: Always define ephemeral-storage requests and limits:
    yaml
    resources:
      requests:
        ephemeral-storage: "2Gi"
      limits:
        ephemeral-storage: "5Gi" # Container killed if it writes >5GB to rootfs/emptyDir!