Kubernetes MCQs with answers Page - 11

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. What does 'kubectl delete -f config.yaml' do?

  • (A) Deletes all nodes
  • (B) Deletes resources defined in config.yaml
  • (C) Deletes Kubernetes CLI cache
  • (D) Deletes default namespace

A

Admin • 828.03K Points
Coach

Q. Which of these is a valid restartPolicy for a pod?

  • (A) Never
  • (B) Always
  • (C) OnFailure
  • (D) All of the above

A

Admin • 828.03K Points
Coach

Q. Which of these is NOT a built-in Kubernetes controller?

  • (A) ReplicaSet
  • (B) Deployment
  • (C) StatefulSet
  • (D) NginxController

A

Admin • 828.03K Points
Coach

Q. How do you view running pods across all namespaces?

  • (A) kubectl get pods
  • (B) kubectl get pods -A
  • (C) kubectl list pods
  • (D) kubectl show all-pods

A

Admin • 828.03K Points
Coach

Q. Which object manages the desired state of ReplicaSets?

  • (A) Pod
  • (B) Deployment
  • (C) Node
  • (D) Service

A

Admin • 828.03K Points
Coach

Q. Which label selector is used to match multiple key-value pairs in Kubernetes?

  • (A) matchOnly
  • (B) matchLabels
  • (C) selectAll
  • (D) multiSelector

A

Admin • 828.03K Points
Coach

Q. What is the primary function of `kubectl config use-context`?

  • (A) Deletes a cluster context
  • (B) Displays all contexts
  • (C) Switches the current context to the specified one
  • (D) Validates the current kubeconfig file

A

Admin • 828.03K Points
Coach

Q. In Kubernetes, which of the following is used to limit CPU and memory usage for a pod?

  • (A) ResourceQuota
  • (B) LimitRange
  • (C) NodeSelector
  • (D) Deployment

A

Admin • 828.03K Points
Coach

Q. What is the default namespace for most Kubernetes objects?

  • (A) default
  • (B) kube-system
  • (C) production
  • (D) dev

A

Admin • 828.03K Points
Coach

Q. Which command provides details about the cluster nodes?

  • (A) kubectl get nodes
  • (B) kubectl describe node
  • (C) kubectl top nodes
  • (D) All of the above

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ