Kubernetes MCQs with answers Page - 14

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 resource can be used to expose a service externally without a LoadBalancer?

  • (A) ClusterIP
  • (B) NodePort
  • (C) ConfigMap
  • (D) PersistentVolumeClaim

A

Admin • 828.03K Points
Coach

Q. How often does a Kubernetes cron job run if set to `*/5 * * * *`?

  • (A) Every 5 seconds
  • (B) Every 5 hours
  • (C) Every 5 minutes
  • (D) Every 5 days

A

Admin • 828.03K Points
Coach

Q. What is the command to delete all pods in a namespace?

  • (A) kubectl delete all pods
  • (B) kubectl delete pods --all
  • (C) kubectl delete pod --namespace=all
  • (D) kubectl remove all pods

A

Admin • 828.03K Points
Coach

Q. Which field defines a pod’s restart behavior in a manifest?

  • (A) restartType
  • (B) restart
  • (C) restartPolicy
  • (D) restartMode

A

Admin • 828.03K Points
Coach

Q. Which Kubernetes object is best suited for stateful applications?

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

A

Admin • 828.03K Points
Coach

Q. How do you pause a rollout of a Deployment?

  • (A) kubectl rollout hold
  • (B) kubectl pause deployment <name>
  • (C) kubectl deployment pause <name>
  • (D) kubectl hold rollout <name>

A

Admin • 828.03K Points
Coach

Q. What happens if a pod is deleted manually in a ReplicaSet?

  • (A) All pods are deleted
  • (B) Pod is permanently removed
  • (C) ReplicaSet creates a new pod automatically
  • (D) Deployment is deleted

A

Admin • 828.03K Points
Coach

Q. Which type of volume is backed by a directory on the host node?

  • (A) emptyDir
  • (B) hostPath
  • (C) nfs
  • (D) persistentVolumeClaim

A

Admin • 828.03K Points
Coach

Q. Which field in a container defines the command that runs inside the container?

  • (A) cmd
  • (B) command
  • (C) run
  • (D) entrypoint

A

Admin • 828.03K Points
Coach

Q. How do you configure Kubernetes to pull images every time a pod is created?

  • (A) imagePolicy: Always
  • (B) imagePullPolicy: IfNotPresent
  • (C) imagePullPolicy: Always
  • (D) pullImages: true

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