Challenge - 5 Problems
Resource Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Pod resource requests and limits effect on scheduling
Given the following Pod YAML, what will be the status of the Pod after applying it to a cluster with only 500m CPU available on any node?
apiVersion: v1
kind: Pod
metadata:
name: test-pod
spec:
containers:
- name: app
image: nginx
resources:
requests:
cpu: "600m"
limits:
cpu: "1"
Kubernetes
kubectl apply -f pod.yaml kubectl get pod test-pod -o jsonpath='{.status.phase}'
Attempts:
2 left
💡 Hint
Think about how Kubernetes schedules Pods based on resource requests.
✗ Incorrect
The Pod requests 600m CPU, but nodes only have 500m available. Kubernetes cannot schedule it, so the Pod stays Pending.
🧠 Conceptual
intermediate1:30remaining
Understanding resource limits impact on container behavior
What happens if a container tries to use more CPU than its limit in Kubernetes?
Attempts:
2 left
💡 Hint
Think about how CPU limits control usage but do not kill the container.
✗ Incorrect
CPU limits cause the container to be throttled, meaning it cannot exceed the CPU usage set by the limit but continues running.
❓ Troubleshoot
advanced2:30remaining
Diagnosing OOMKilled due to memory limits
A Pod is repeatedly restarting with status 'OOMKilled'. The Pod spec includes:
What is the most likely cause?
resources:
limits:
memory: "256Mi"
requests:
memory: "128Mi"What is the most likely cause?
Attempts:
2 left
💡 Hint
OOMKilled means out of memory kill by the kernel.
✗ Incorrect
When a container exceeds its memory limit, the kernel kills it to protect the node, causing OOMKilled status.
🔀 Workflow
advanced2:00remaining
Setting resource requests and limits in a Deployment YAML
Which snippet correctly sets CPU requests to 200m and limits to 500m for a container in a Deployment?
Attempts:
2 left
💡 Hint
Remember the correct keys under resources are requests and limits.
✗ Incorrect
Option D correctly uses requests and limits keys with cpu values as strings with units.
✅ Best Practice
expert3:00remaining
Choosing resource requests and limits for production workloads
Which approach is best when setting resource requests and limits for a production Kubernetes workload?
Attempts:
2 left
💡 Hint
Think about balancing resource guarantees and flexibility.
✗ Incorrect
Setting requests based on average usage ensures scheduling fits node capacity, while limits allow bursts. Monitoring helps adjust values.