Kubernetes MCQs with answers Page - 10

Here, you will find a collection of MCQ questions on Kubernetes. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. How can you list all services in a namespace?

  • (A) kubectl get svc
  • (B) kubectl get services --all
  • (C) kubectl list service
  • (D) kubectl show svc

A

Admin • 833.24K Points
Coach

Q. What does 'CrashLoopBackOff' status mean for a pod?

  • (A) Pod is scheduled for deletion
  • (B) Pod is successfully running
  • (C) Container inside the pod is repeatedly crashing
  • (D) Pod has insufficient CPU

A

Admin • 833.24K Points
Coach

Q. Which of these supports horizontal scaling in Kubernetes?

  • (A) DaemonSet
  • (B) StatefulSet
  • (C) Deployment
  • (D) Job

A

Admin • 833.24K Points
Coach

Q. What is the purpose of a ServiceAccount in Kubernetes?

  • (A) To monitor pod logs
  • (B) To assign permissions to pods
  • (C) To expose a service externally
  • (D) To schedule a job

A

Admin • 833.24K Points
Coach

Q. What does 'kubectl top node' show?

  • (A) Disk usage of nodes
  • (B) Pod uptime
  • (C) CPU and memory usage of nodes
  • (D) Event logs of nodes

A

Admin • 833.24K Points
Coach

Q. Which plugin is responsible for internal DNS resolution in Kubernetes?

  • (A) cAdvisor
  • (B) CoreDNS
  • (C) fluentd
  • (D) kube-proxy

A

Admin • 833.24K Points
Coach

Q. Which command allows you to get the version of the Kubernetes cluster?

  • (A) kubectl version
  • (B) kubectl get version
  • (C) kubectl info
  • (D) kubectl cluster-version

A

Admin • 833.24K Points
Coach

Q. What is a node in Kubernetes?

  • (A) A container image
  • (B) A physical or virtual machine where pods run
  • (C) A configuration file
  • (D) A type of persistent storage

A

Admin • 833.24K Points
Coach

Q. Which field is used to define the image in a pod?

  • (A) spec.image
  • (B) metadata.image
  • (C) containers.image
  • (D) spec.containers.image

A

Admin • 833.24K Points
Coach

Q. How does Kubernetes provide self-healing?

  • (A) By using node labels
  • (B) By re-deploying jobs
  • (C) By replacing failed pods automatically
  • (D) By changing network policies