Kubernetes MCQs with answers Page - 7

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 • 828.03K Points
Coach

Q. Which of the following is a command to delete a Kubernetes namespace?

  • (A) kubectl delete ns my-namespace
  • (B) kubectl drop namespace my-namespace
  • (C) kubectl remove namespace my-namespace
  • (D) kubectl erase ns my-namespace

A

Admin • 828.03K Points
Coach

Q. How are Helm charts used in Kubernetes?

  • (A) For scheduling pods
  • (B) For automatic pod healing
  • (C) For managing Kubernetes applications via packages
  • (D) For defining node affinity

A

Admin • 828.03K Points
Coach

Q. Which component keeps track of all Kubernetes cluster configuration and data?

  • (A) kube-apiserver
  • (B) etcd
  • (C) kubelet
  • (D) kube-controller-manager

A

Admin • 828.03K Points
Coach

Q. What is the minimum number of master nodes recommended for high availability in Kubernetes?

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 4

A

Admin • 828.03K Points
Coach

Q. Which of the following will show resource usage of pods?

  • (A) kubectl logs
  • (B) kubectl top pods
  • (C) kubectl describe
  • (D) kubectl metrics pods

A

Admin • 828.03K Points
Coach

Q. Which command is used to view the events in a Kubernetes cluster?

  • (A) kubectl view events
  • (B) kubectl get events
  • (C) kubectl list events
  • (D) kubectl show events

A

Admin • 828.03K Points
Coach

Q. Which component in Kubernetes ensures that containers are restarted if they fail?

  • (A) kube-proxy
  • (B) kubelet
  • (C) etcd
  • (D) kube-apiserver

A

Admin • 828.03K Points
Coach

Q. Which Kubernetes resource defines how to update pods during a deployment?

  • (A) PodSpec
  • (B) ReplicaSet
  • (C) Strategy
  • (D) DaemonSet

A

Admin • 828.03K Points
Coach

Q. Which Kubernetes object runs a specific task to completion once?

  • (A) Deployment
  • (B) Job
  • (C) CronJob
  • (D) ReplicaSet

A

Admin • 828.03K Points
Coach

Q. Which command shows the YAML configuration of a Kubernetes resource?

  • (A) kubectl read
  • (B) kubectl config
  • (C) kubectl view
  • (D) kubectl get <resource> -o yaml