Bird
0
0

Which of the following is the correct way to specify CPU requests and limits in a pod YAML?

easy📝 Configuration Q12 of 15
Kubernetes - Resource Management
Which of the following is the correct way to specify CPU requests and limits in a pod YAML?
Aresources: cpu: request: 500m limit: 1
Bresources: requests: cpu: 500 limits: cpu: 1000
Cresources: requests: cpu: "500m" limits: cpu: "1"
Dresources: requests: cpu: "1.0" limits: cpu: "0.5"
Step-by-Step Solution
Solution:
  1. Step 1: Check correct YAML structure for resources

    The correct keys are requests and limits under resources, with CPU values as strings with units like "500m" or "1".
  2. Step 2: Validate resources: requests: cpu: "500m" limits: cpu: "1" format

    resources: requests: cpu: "500m" limits: cpu: "1" uses correct keys and units: "500m" means 0.5 CPU, "1" means 1 CPU core.
  3. Final Answer:

    resources: requests: cpu: "500m" limits: cpu: "1" -> Option C
  4. Quick Check:

    Correct YAML keys and CPU units = resources: requests: cpu: "500m" limits: cpu: "1" [OK]
Quick Trick: Use 'requests' and 'limits' keys with CPU as string with units [OK]
Common Mistakes:
  • Using 'request' instead of 'requests'
  • Specifying CPU as numbers without quotes or units
  • Mixing up 'cpu' and 'memory' keys

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes