Bird
0
0

Which of the following is the correct syntax to set a memory request of 256Mi in a container spec?

easy📝 Configuration Q3 of 15
Kubernetes - Scheduling
Which of the following is the correct syntax to set a memory request of 256Mi in a container spec?
Aresources: requests: memory: '256Mi'
Bresources: limits: memory: 256
Crequests: memory: 256Mi
Dmemory: requests: 256Mi
Step-by-Step Solution
Solution:
  1. Step 1: Review correct YAML structure for resource requests

    Resources must be under resources.requests with memory as a key and value as a string with units.
  2. Step 2: Validate syntax correctness

    resources: requests: memory: '256Mi' correctly uses resources.requests.memory: '256Mi'. Others have wrong keys or missing structure.
  3. Final Answer:

    resources: requests: memory: '256Mi' -> Option A
  4. Quick Check:

    Correct memory request syntax = resources: requests: memory: '256Mi' [OK]
Quick Trick: Use resources.requests.memory with units as string [OK]
Common Mistakes:
  • Omitting 'resources' parent key
  • Using limits instead of requests for minimum
  • Not quoting memory units

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes