Bird
0
0

Which of the following is the correct YAML snippet to define a CPU limit of 2 cores in a ResourceQuota?

easy📝 Configuration Q12 of 15
Kubernetes - Namespaces
Which of the following is the correct YAML snippet to define a CPU limit of 2 cores in a ResourceQuota?
Ahard: limits.cpu: "2"
Bresources: limits: cpu: "2"
Chard: cpu: "2"
Dhard: limits.cpu: 2
Step-by-Step Solution
Solution:
  1. Step 1: Recall ResourceQuota syntax for limits

    ResourceQuota uses the hard field with resource names like limits.cpu as keys and string values.
  2. Step 2: Check each option's syntax

    hard: limits.cpu: "2" correctly uses hard: with limits.cpu: "2". resources: limits: cpu: "2" uses wrong keys, C misses limits., D uses number instead of string.
  3. Final Answer:

    hard: limits.cpu: "2" -> Option A
  4. Quick Check:

    ResourceQuota hard limits use string values with resource keys [OK]
Quick Trick: ResourceQuota limits use 'hard' with string values [OK]
Common Mistakes:
  • Using numeric values instead of strings
  • Omitting 'limits.' prefix in resource keys
  • Placing limits under wrong YAML keys

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes