Bird
0
0

You want to update a ReplicaSet to increase replicas from 2 to 5 but keep the same pods running without downtime. What is the best approach?

hard📝 Workflow Q15 of 15
Kubernetes - ReplicaSets and Deployments
You want to update a ReplicaSet to increase replicas from 2 to 5 but keep the same pods running without downtime. What is the best approach?
AScale the ReplicaSet using kubectl scale command to 5 replicas
BDelete the ReplicaSet and create a new one with replicas: 5
CEdit the ReplicaSet YAML to set replicas: 5 and apply it
DChange the pod template labels to new values and apply
Step-by-Step Solution
Solution:
  1. Step 1: Understand scaling ReplicaSet

    Scaling with kubectl scale updates replicas live without downtime.
  2. Step 2: Evaluate other options

    Editing YAML and applying works but less safe than scale command. Deleting ReplicaSet causes downtime. Changing labels breaks pod matching.
  3. Final Answer:

    Scale the ReplicaSet using kubectl scale command to 5 replicas -> Option A
  4. Quick Check:

    Use kubectl scale for live replica changes [OK]
Quick Trick: Use kubectl scale to change replicas live [OK]
Common Mistakes:
  • Deleting ReplicaSet causes downtime
  • Changing labels breaks pod matching
  • Editing YAML directly risks errors

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes