0
0
Kubernetesdevops~20 mins

OOMKilled containers in Kubernetes - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
OOMKilled Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
Identify the cause of OOMKilled status
You run kubectl get pods and see a pod with status OOMKilled. What does this status mean?
AThe pod was terminated because it used more memory than its limit.
BThe pod was restarted due to a network failure.
CThe pod completed successfully and exited normally.
DThe pod was deleted manually by the user.
Attempts:
2 left
💡 Hint
Think about what OOM stands for in computing.
Troubleshoot
intermediate
1:30remaining
Diagnose memory limits causing OOMKilled
You have a pod that keeps restarting with OOMKilled status. Which command helps you check the memory limits set on the pod?
Akubectl describe pod <pod-name>
Bkubectl logs <pod-name>
Ckubectl get nodes
Dkubectl exec <pod-name> -- free -m
Attempts:
2 left
💡 Hint
Look for resource limits in pod details.
Configuration
advanced
2:00remaining
Correct memory limit configuration to avoid OOMKilled
Which YAML snippet correctly sets a memory limit of 512Mi to prevent OOMKilled errors?
Kubernetes
apiVersion: v1
kind: Pod
metadata:
  name: example-pod
spec:
  containers:
  - name: example-container
    image: nginx
    resources:
A
      requests:
        memory: 512
B
      limits:
        memory: "512Mi"
C
      limits:
        memory: 512
D
      requests:
        memory: "512Mi"
Attempts:
2 left
💡 Hint
Memory limits must include units and be under 'limits'.
Best Practice
advanced
2:00remaining
Best practice to prevent OOMKilled in production pods
What is the best practice to avoid OOMKilled errors in production Kubernetes pods?
ADisable memory limits to let pods use unlimited memory.
BSet CPU limits only and ignore memory settings.
CSet very high memory limits without requests to avoid killing.
DSet both memory requests and limits based on real usage metrics.
Attempts:
2 left
💡 Hint
Think about balancing resource allocation and stability.
🔀 Workflow
expert
2:30remaining
Sequence to troubleshoot OOMKilled pod
Arrange the steps in the correct order to troubleshoot an OOMKilled pod:
A3,1,2,4
B2,1,3,4
C1,3,2,4
D1,2,3,4
Attempts:
2 left
💡 Hint
Start with pod status, then check config, then logs, then fix.