Challenge - 5 Problems
Resource Quota Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Check current resource quotas in a namespace
You run the command
kubectl get resourcequota -n dev. What output do you expect if no resource quotas are set in the dev namespace?Kubernetes
kubectl get resourcequota -n devAttempts:
2 left
💡 Hint
Think about what kubectl shows when no resource quotas exist in a namespace.
✗ Incorrect
If no resource quotas exist in the specified namespace, kubectl shows a message indicating no resources found. It does not show errors or quota details.
❓ Configuration
intermediate2:00remaining
Define a resource quota limiting CPU and memory
Which YAML snippet correctly defines a resource quota named
limit-quota in namespace test that limits CPU to 2 cores and memory to 4Gi?Attempts:
2 left
💡 Hint
Check the correct placement of namespace and the 'hard' field format.
✗ Incorrect
The namespace is set under metadata. The resource limits go under spec.hard with values as strings. CPU is specified as "2" (string), not 2 (number) or '2 cores'.
❓ Troubleshoot
advanced1:30remaining
Why is a pod creation failing due to resource quota?
You have a resource quota limiting pods to 5 in namespace
prod. You try to create a 6th pod and get this error: pods "mypod" is forbidden: exceeded quota: pod-quota, requested: pods=1, used: pods=5, limited: pods=5. What is the root cause?Attempts:
2 left
💡 Hint
Look at the error message details about pods and quota limits.
✗ Incorrect
The error clearly states the pod count requested exceeds the quota limit of 5 pods in the namespace, so the creation is blocked.
🔀 Workflow
advanced2:00remaining
Steps to update an existing resource quota
You want to increase the CPU limit in an existing resource quota named
cpu-quota in namespace dev from 2 to 4 cores. Which sequence of commands is correct?Attempts:
2 left
💡 Hint
Consider different ways kubectl allows editing resources.
✗ Incorrect
All three methods (export-edit-apply, kubectl edit, and kubectl patch) are valid ways to update resource quotas in Kubernetes.
✅ Best Practice
expert1:30remaining
Why use resource quotas per namespace in a multi-team cluster?
What is the main benefit of applying resource quotas per namespace in a Kubernetes cluster shared by multiple teams?
Attempts:
2 left
💡 Hint
Think about resource fairness and limits in shared environments.
✗ Incorrect
Resource quotas limit resource consumption per namespace, preventing teams from exhausting cluster resources and ensuring fair sharing.