nerdexam
CiscoCisco

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.

Deployment

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 nodes is used to list the nodes in the cluster and their status, not to deploy an application.
  • B. kubectl run deployments is an incomplete and incorrect command; deployments is a resource type, but kubectl run requires an image and a name to create an instance.
  • D. kubectl version displays 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

#Kubernetes deployment#kubectl commands#Microservices#Containerization

Community Discussion

No community discussion yet for this question.

Full 300-910 PracticeBrowse All 300-910 Questions