Bird
0
0

Given this pod spec snippet, what happens if the container tries to use 1 CPU but the limit is 500m?

medium📝 Command Output Q13 of 15
Kubernetes - Resource Management
Given this pod spec snippet, what happens if the container tries to use 1 CPU but the limit is 500m?
resources:
  requests:
    cpu: "250m"
  limits:
    cpu: "500m"
AThe container can use up to 1 CPU without restrictions.
BThe container ignores limits and uses requested CPU only.
CThe container is limited to 500m CPU and cannot exceed it.
DThe container will be killed immediately for exceeding requests.
Step-by-Step Solution
Solution:
  1. Step 1: Understand CPU requests vs limits

    Requests are guaranteed CPU; limits are the max CPU allowed. Here, request is 250m, limit is 500m.
  2. Step 2: Analyze container CPU usage behavior

    If container tries to use 1 CPU, it exceeds the 500m limit, so Kubernetes restricts it to 500m CPU max.
  3. Final Answer:

    The container is limited to 500m CPU and cannot exceed it. -> Option C
  4. Quick Check:

    CPU limit caps usage at 500m [OK]
Quick Trick: Limits cap max usage; requests guarantee minimum [OK]
Common Mistakes:
  • Confusing requests with limits
  • Thinking container can exceed CPU limit
  • Believing container is killed for exceeding requests

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes