Kubernetes MCQs with answers Page - 13

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 get all` display?

  • (A) All namespaces and users
  • (B) All resources in the current namespace
  • (C) All pods in the cluster
  • (D) All events and logs

A

Admin • 828.03K Points
Coach

Q. What is a use case for using node affinity?

  • (A) Load balancing
  • (B) Running logging containers
  • (C) Scheduling pods on specific node types
  • (D) Scaling up pods

A

Admin • 828.03K Points
Coach

Q. Which type of Kubernetes service allows external access using a cloud provider's load balancer?

  • (A) ClusterIP
  • (B) NodePort
  • (C) LoadBalancer
  • (D) ExternalName

A

Admin • 828.03K Points
Coach

Q. What is the recommended way to manage Kubernetes manifests as code?

  • (A) kubectl create
  • (B) Manual editing in terminal
  • (C) YAML files with GitOps
  • (D) Using `docker run` commands

A

Admin • 828.03K Points
Coach

Q. Which field in Deployment helps prevent multiple versions of an app from running simultaneously?

  • (A) strategy.rollingUpdate
  • (B) spec.selector
  • (C) metadata.name
  • (D) spec.template

A

Admin • 828.03K Points
Coach

Q. What does the 'spec.selector' field do in a Kubernetes Service definition?

  • (A) Specifies which nodes to use
  • (B) Selects pods that the service targets
  • (C) Defines the ingress rules
  • (D) Sets the number of replicas

A

Admin • 828.03K Points
Coach

Q. Which of these resources is cluster-scoped and not namespaced?

  • (A) Pod
  • (B) Service
  • (C) PersistentVolume
  • (D) ConfigMap

A

Admin • 828.03K Points
Coach

Q. Which controller manages batch jobs in Kubernetes?

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

A

Admin • 828.03K Points
Coach

Q. What is the default value of restartPolicy in a pod created by a Deployment?

  • (A) Never
  • (B) OnFailure
  • (C) Always
  • (D) Manual

A

Admin • 828.03K Points
Coach

Q. Which Kubernetes object is responsible for managing IPs and DNS for pods?

  • (A) CoreDNS
  • (B) kube-proxy
  • (C) CNI Plugin
  • (D) etcd

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