
Answer-first summary for fast verification
Answer: kubectl create namespace production
The correct Kubernetes command to create a namespace called 'production' is `kubectl create namespace production`. This is the standard syntax for creating a namespace using the kubectl command-line tool. - `kubectl create ns production`: While 'ns' is a valid shorthand for 'namespace' in many kubectl commands, it does not work for the create namespace command. - `kubectl ns create production`: This is not a valid kubectl command structure. - `kubectl namespace create production`: This is also not a valid kubectl command structure. For more details, refer to the [Google Cloud Codelabs](https://codelabs.developers.google.com/codelabs/cloud-builder-gke-continuous-deploy/index.html#3).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
When preparing to deploy a CI pipeline on GCP, you need to ensure the correct syntax for creating a Kubernetes namespace named 'production' to logically isolate the deployment. Which of the following Kubernetes commands accomplishes this?
A
kubectl ns create production
B
kubectl create namespace production
C
kubectl namespace create production
D
kubectl create ns production
No comments yet.