Scheduling and Resource Pressure Diagnosis
Pending and evicted Pods indicate different issues during traffic spikes in Kubernetes. Diagnosing these requires distinguishing between scheduler decisions and kubelet evictions using evidence from Pod and Node statuses. Tools like kubectl describe help identify resource pressures and scheduling failures. Adjustments to resource requests or scaling workloads can mitigate issues, but must be verified to ensure they resolve the problem without exacerbating it. Effective management also involves understanding taints, tolerations, and maintaining node stability during operations like draining.
We'll cover the following...
Pending and evicted Pods can both appear during a traffic spike, but they represent different failure conditions. In an evaluation, the key skill is to distinguish a scheduler decision from a kubelet eviction using read-only evidence, then propose a small change with a verifiable effect.
A Pod phase is a high-level lifecycle summary. Pending means the Pod has been accepted but is still waiting to schedule or finish setup, which can include image download time. A node-pressure eviction occurs when the kubelet terminates Pods to reclaim constrained node resources; the affected Pod is marked Failed. Pod status alone narrows the investigation but does not establish the cause.
The first step is to inspect the Pod with:
kubectl describe pod <pod> -n <namespace> --context <context>
Its conditions and Events show whether the scheduler reported FailedScheduling ...