Certified Kubernetes Application Developer (CKAD) Practice Test

1 / 400

How would you scale an existing deployment in Kubernetes?

kubectl adjust deployment [deployment-name] --replicas=[number]

kubectl scale deployment [deployment-name] --replicas=[number]

Scaling an existing deployment in Kubernetes is accomplished using the scaling command specifically designed for that purpose. The command involves the use of `kubectl scale`. This command allows you to change the number of replicas in a deployment, which directly impacts how many pods will be running for that deployment.

In the context of the answer provided, when you use `kubectl scale deployment [deployment-name] --replicas=[number]`, you effectively instruct Kubernetes to adjust the desired state of the deployment. For example, if you specify a number greater than the current replica count, Kubernetes will create additional pods to meet that count. Conversely, specifying a lower number will lead to pods being terminated until the desired state is achieved.

The other options either refer to nonexistent commands or commands that do not achieve the goal of scaling a deployment effectively. Adjusting, modifying, or upgrading a deployment does not directly correspond to scaling the number of replicas.

Get further explanation with Examzify DeepDiveBeta

kubectl modify deployment [deployment-name] --replicas=[number]

kubectl upgrade deployment [deployment-name] --replicas=[number]

Next Question
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy