Which command is used to scale the number of Deployment replicas?

Study for the Kubernetes Cloud Native Associate (KCNA) Certification 1 Test. Master the core concepts of Kubernetes with multiple-choice questions and detailed explanations. Prepare and boost your confidence for the KCNA certification exam!

Multiple Choice

Which command is used to scale the number of Deployment replicas?

Explanation:
Scaling the number of Deployment replicas means changing how many pod instances Kubernetes should run for that Deployment. The command designed for this task is kubectl scale, which updates the replicas field directly (for example: kubectl scale deployment my-app --replicas=5). Once you set a new replica count, the Kubernetes controllers will create or terminate pods to reach the desired number. Other commands serve different purposes: apply brings in a manifest to create or update resources, set image changes container images, and patch makes targeted edits to a resource; none are as direct and explicit for adjusting the replica count as scale.

Scaling the number of Deployment replicas means changing how many pod instances Kubernetes should run for that Deployment. The command designed for this task is kubectl scale, which updates the replicas field directly (for example: kubectl scale deployment my-app --replicas=5). Once you set a new replica count, the Kubernetes controllers will create or terminate pods to reach the desired number. Other commands serve different purposes: apply brings in a manifest to create or update resources, set image changes container images, and patch makes targeted edits to a resource; none are as direct and explicit for adjusting the replica count as scale.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy