Bird
0
0

Which of the following is the correct YAML snippet to set desired replicas to 3 in a Deployment?

easy📝 Configuration Q12 of 15
Kubernetes - ReplicaSets and Deployments
Which of the following is the correct YAML snippet to set desired replicas to 3 in a Deployment?
AreplicaCount: 3
BdesiredReplicas: 3
Creplicas: 3
Dpods: 3
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct field name in Deployment spec

    The correct field to set desired replicas is replicas under the spec section.
  2. Step 2: Verify syntax correctness

    Using replicas: 3 is valid YAML and recognized by Kubernetes.
  3. Final Answer:

    replicas: 3 -> Option C
  4. Quick Check:

    Use 'replicas' to set desired pod count [OK]
Quick Trick: Use 'replicas' key in Deployment spec to set desired pods [OK]
Common Mistakes:
  • Using incorrect field names like desiredReplicas or replicaCount
  • Placing replicas outside the spec section
  • Using plural 'pods' instead of 'replicas'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes