What is Kubernetes resource management?

Why Interviewers Ask This

Foundational questions like this help interviewers calibrate the rest of the interview. A confident, accurate answer signals that you have solid Kubernetes (K8s) basics — a prerequisite for any developer role.

Answer

Kubernetes resource management defines how CPU and memory are allocated to containers and how the scheduler places pods on nodes: Requests: the minimum resources the container needs — guaranteed by the scheduler. If a node has fewer resources than requested, the pod won't be scheduled there. Limits: the maximum resources the container can use. CPU is throttled if exceeded. Memory eviction (OOMKilled) if exceeded. Resource units: CPU: cores (1 CPU = 1000m millicores; 250m = 0.25 CPU); Memory: bytes (Mi = mebibytes, Gi = gibibytes). Resource spec: resources: requests: memory: "128Mi" cpu: "250m" limits: memory: "256Mi" cpu: "500m". Quality of Service (QoS) classes: Guaranteed: requests == limits for all containers — highest priority, last to be evicted; Burstable: requests < limits for at least one container — middle priority; BestEffort: no requests or limits — lowest priority, first evicted when node is under memory pressure. LimitRange: namespace-level default requests/limits: kubectl apply -f limitrange.yaml — prevents unbounded resource consumption in a namespace. ResourceQuota: total resource usage limit per namespace. Vertical Pod Autoscaler (VPA): automatically adjusts container resource requests based on actual usage. Best practices: always set requests (for scheduling); set limits (prevent noisy neighbor); monitor actual usage with kubectl top or Prometheus; use VPA recommendations to right-size. Avoid setting CPU limits in many scenarios — throttling can cause latency spikes even when CPU is available.

Common Mistake

Candidates often give textbook answers here. Interviewers are more impressed when you relate the concept to a specific problem you solved in a real Kubernetes (K8s) project.