Kubernetes MCQs with answers Page - 12

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 flag is used with `kubectl run` to expose a pod?

  • (A) --port
  • (B) --expose
  • (C) --type
  • (D) --listen

A

Admin • 828.03K Points
Coach

Q. Which file does `kubectl` use to connect to the Kubernetes cluster?

  • (A) ~/.kube/config
  • (B) /etc/kubernetes/kubeconfig.yaml
  • (C) /usr/local/kube/config.json
  • (D) ~/.kube/k8s.json

A

Admin • 828.03K Points
Coach

Q. How do you check the rollout status of a deployment?

  • (A) kubectl status deployment
  • (B) kubectl rollout status deployment <name>
  • (C) kubectl get deployment-status
  • (D) kubectl describe rollout deployment

A

Admin • 828.03K Points
Coach

Q. What does the `terminationGracePeriodSeconds` define?

  • (A) Time to restart a crashed pod
  • (B) Time given to a pod to clean up before termination
  • (C) Maximum time to scale down
  • (D) Default timeout for services

A

Admin • 828.03K Points
Coach

Q. Which of the following is used to pull private container images in Kubernetes?

  • (A) Secret of type docker-registry
  • (B) ConfigMap
  • (C) RoleBinding
  • (D) VolumeMount

A

Admin • 828.03K Points
Coach

Q. Which of these will NOT trigger a new ReplicaSet during deployment updates?

  • (A) Changing container image
  • (B) Modifying labels on the pod template
  • (C) Changing resource requests
  • (D) Updating annotations outside pod template

A

Admin • 828.03K Points
Coach

Q. How do you permanently delete a pod?

  • (A) kubectl delete pod <name>
  • (B) kubectl remove pod <name>
  • (C) kubectl shutdown pod <name>
  • (D) kubectl kill pod <name>

A

Admin • 828.03K Points
Coach

Q. What happens when you run `kubectl delete deployment <name>`?

  • (A) The deployment and its pods are deleted
  • (B) Only the deployment is deleted, pods stay
  • (C) Only the pods are deleted
  • (D) The deployment is paused

A

Admin • 828.03K Points
Coach

Q. Which controller ensures a specific number of pod replicas are running?

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

A

Admin • 828.03K Points
Coach

Q. Which file system type is commonly used with PersistentVolumes in Kubernetes?

  • (A) ntfs
  • (B) ext4
  • (C) fat32
  • (D) btrfs

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