Bird
0
0

Given this Pod spec snippet, what happens if the container tries to use 3 CPUs?

medium📝 Command Output Q4 of 15
Kubernetes - Scheduling
Given this Pod spec snippet, what happens if the container tries to use 3 CPUs?
resources:
  requests:
    cpu: "1"
  limits:
    cpu: "2"
AThe container is limited to 2 CPUs and cannot exceed this
BThe Pod will fail to start due to invalid CPU request
CThe container will be throttled to 1 CPU
DThe container is allowed to use 3 CPUs without restriction
Step-by-Step Solution
Solution:
  1. Step 1: Understand CPU requests and limits

    Requests reserve 1 CPU minimum; limits cap usage at 2 CPUs maximum.
  2. Step 2: Analyze container CPU usage attempt

    Trying to use 3 CPUs exceeds the limit of 2, so usage is capped at 2 CPUs.
  3. Final Answer:

    The container is limited to 2 CPUs and cannot exceed this -> Option A
  4. Quick Check:

    CPU usage capped by limits.cpu = 2 [OK]
Quick Trick: Limits cap max usage; requests reserve minimum [OK]
Common Mistakes:
  • Assuming container can exceed limits
  • Confusing requests with limits
  • Thinking Pod fails on exceeding limits

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes