300-910 · Question #110
300-910 Question #110: Real Exam Question with Answer & Explanation
The correct answer is C: kubectl run kubernetes-deployment\ --image=gcr.io/kubertfetes-deployment:v1 \ --port=8080. To deploy an application as a pod or deployment directly from a container image in Kubernetes, the kubectl run command with the image and port specifications is used.
Question
An application is developed based on microservices. The application must be installed on a pod in a separate cluster. Which command must be used to deploy the application?
Options
- Akubectl get nodes
- Bkubectl run deployments
- Ckubectl run kubernetes-deployment\ --image=gcr.io/kubertfetes-deployment:v1 \ --port=8080
- Dkubectl version
Explanation
To deploy an application as a pod or deployment directly from a container image in Kubernetes, the kubectl run command with the image and port specifications is used.
Common mistakes.
- A.
kubectl get nodesis used to list the nodes in the cluster and their status, not to deploy an application. - B.
kubectl run deploymentsis an incomplete and incorrect command;deploymentsis a resource type, butkubectl runrequires an image and a name to create an instance. - D.
kubectl versiondisplays the client and server versions of Kubernetes, which is for informational purposes, not for deploying applications.
Concept tested. Kubernetes deploying applications with kubectl run
Reference. https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#run
Topics
Community Discussion
No community discussion yet for this question.