What command is used to create a new deployment in Kubernetes?

Prepare for the Certified Kubernetes Administrator Exam with our in-depth quiz. Access flashcards and multiple-choice questions, each accompanied by hints and explanations. Ace your Kubernetes exam!

The command used to create a new deployment in Kubernetes is "kubectl create deployment." This command is part of the kubectl tool, which is the primary command-line interface for interacting with Kubernetes clusters.

When you issue this command, you typically provide a name for the deployment, the desired number of replicas, and the container image that the deployment will use. This will instruct Kubernetes to start the specified number of pod replicas based on the container image defined, creating a managed deployment that can be scaled and updated as needed.

The other commands either do not exist in the context of creating a deployment or are misapplied terms. "kubectl apply" is generally used to apply a configuration from a file or input, not specifically to create a deployment, which could lead to confusion. "kubectl new deployment" does not exist as a valid command in kubectl syntax. Finally, "kubectl run deployment" is not accurate because while "kubectl run" can create pods, it does not specifically create a deployment.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy