A pod in the 'production' namespace is in a CrashLoopBackOff state. The pod has been running successfully for several days. You run 'kubectl describe pod app-pod -n production' and see the message: 'OOMKilled'. What is the MOST appropriate action to resolve this issue?
Trap 1: Delete the namespace and redeploy all workloads
Deleting the namespace removes every workload in production, not just the OOMKilled pod, so it cannot address a single container exceeding its memory limit. Namespace deletion suits decommissioning an entire environment or clearing a test namespace, where all contained resources are genuinely disposable.
Trap 2: Delete and recreate the pod to clear the crash loop
Recreating the pod produces an identical spec, so the container again exceeds its memory limit and returns to CrashLoopBackOff. Deleting and recreating pods is for clearing stuck states such as a bad node binding or an evicted pod, not for a deterministic resource-limit breach.
Trap 3: Increase the CPU request for the container
OOMKilled means the kernel terminated the container for exceeding its memory limit, so raising the CPU request leaves the memory ceiling unchanged and the pod keeps restarting. CPU requests govern scheduling and throttling, and are the right lever when a container is CPU-starved, not memory-killed.
- A
Increase the memory limit in the pod's container resource specification
OOMKilled means the container exceeded its memory limit and the kernel terminated it, so raising that limit directly addresses the constraint. Editing the container's resources.limits.memory in the pod spec, then recreating the pod, gives the process the headroom it needs to run without being killed.
- B
Delete the namespace and redeploy all workloads
Why it fails: Deleting the namespace removes every workload in production, not just the OOMKilled pod, so it cannot address a single container exceeding its memory limit. Namespace deletion suits decommissioning an entire environment or clearing a test namespace, where all contained resources are genuinely disposable.
- C
Delete and recreate the pod to clear the crash loop
Why it fails: Recreating the pod produces an identical spec, so the container again exceeds its memory limit and returns to CrashLoopBackOff. Deleting and recreating pods is for clearing stuck states such as a bad node binding or an evicted pod, not for a deterministic resource-limit breach.
- D
Increase the CPU request for the container
Why it fails: OOMKilled means the kernel terminated the container for exceeding its memory limit, so raising the CPU request leaves the memory ceiling unchanged and the pod keeps restarting. CPU requests govern scheduling and throttling, and are the right lever when a container is CPU-starved, not memory-killed.