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
This is a destructive action that would affect all workloads in the namespace. It is not appropriate for resolving a single pod's memory issue.
Trap 2: Delete and recreate the pod to clear the crash loop
Deleting and recreating the pod without changing the resource limits will result in the same OOMKilled event.
Trap 3: Increase the CPU request for the container
OOMKilled is a memory issue, not a CPU issue. Increasing CPU requests will not prevent the container from being killed due to memory exhaustion.
- A
Increase the memory limit in the pod's container resource specification
OOMKilled indicates the container exceeded its configured memory limit. Increasing the memory limit allows the container to use more memory and prevents the OOM kill.
- B
Delete the namespace and redeploy all workloads
Why wrong: This is a destructive action that would affect all workloads in the namespace. It is not appropriate for resolving a single pod's memory issue.
- C
Delete and recreate the pod to clear the crash loop
Why wrong: Deleting and recreating the pod without changing the resource limits will result in the same OOMKilled event.
- D
Increase the CPU request for the container
Why wrong: OOMKilled is a memory issue, not a CPU issue. Increasing CPU requests will not prevent the container from being killed due to memory exhaustion.