Kubernetes MCQs with answers Page - 5

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

Q. Which command creates a resource from a YAML file?

  • (A) kubectl apply -f filename.yaml
  • (B) kubectl run -f filename.yaml
  • (C) kubectl generate -f filename.yaml
  • (D) kubectl deploy -f filename.yaml

A

Admin • 833.24K Points
Coach

Q. Which type of storage is deleted when a pod is deleted?

  • (A) PersistentVolume
  • (B) PersistentVolumeClaim
  • (C) EmptyDir
  • (D) HostPath

A

Admin • 833.24K Points
Coach

Q. Which Kubernetes resource groups multiple containers together in one environment?

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

A

Admin • 833.24K Points
Coach

Q. What is the use of labels in Kubernetes?

  • (A) To assign resource quotas
  • (B) To assign IP addresses
  • (C) To organize and select groups of objects
  • (D) To monitor resource usage

A

Admin • 833.24K Points
Coach

Q. How can you restrict a pod to run only on specific nodes?

  • (A) By using labels only
  • (B) By setting nodeSelector or affinity rules
  • (C) By modifying the kube-apiserver
  • (D) By changing the pod IP

A

Admin • 833.24K Points
Coach

Q. What does RBAC stand for in Kubernetes?

  • (A) Role Based Access Control
  • (B) Remote Base Authentication Configuration
  • (C) Replica Based Auto Control
  • (D) Resource Based Account Control

A

Admin • 833.24K Points
Coach

Q. Which of the following is used to define access permissions in Kubernetes RBAC?

  • (A) Role and Policy
  • (B) User and Group
  • (C) Role and RoleBinding
  • (D) Namespace and Secret

A

Admin • 833.24K Points
Coach

Q. What is a Custom Resource Definition (CRD) in Kubernetes?

  • (A) A user-defined service
  • (B) A way to customize container runtime
  • (C) A way to extend Kubernetes with custom objects
  • (D) A custom deployment strategy

A

Admin • 833.24K Points
Coach

Q. Which Kubernetes object provides persistent storage for pods?

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

A

Admin • 833.24K Points
Coach

Q. Which component schedules pods to nodes in a Kubernetes cluster?

  • (A) kube-apiserver
  • (B) kube-scheduler
  • (C) kubelet
  • (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