Debug School

Akanksha
Akanksha

Posted on

Top 30 Kubernetes Interview Questions with Answers multiple choice style

1. What is Kubernetes?

A. A containerization platform
B. A virtualization platform
C. A monitoring tool
D. An orchestration platform
Answer: D

2. What is the primary purpose of Kubernetes?

A. Managing virtual machines
B. Running containers at scale
C. Configuring network settings
D. Creating microservices
Answer: B

3. Which container runtime is used by Kubernetes by default?

A. Docker
B. Podman
C. rkt
D. Containerd
Answer: D

4. What is a Pod in Kubernetes?

A. A group of nodes
B. A type of container
C. The smallest deployable unit
D. A namespace
Answer: C

5. How does a Service in Kubernetes expose pods to the network?

A. By exposing pod IP addresses
B. By exposing pod hostnames
C. By creating a load balancer
D. By assigning public IP addresses to pods
Answer: B

6. What is a Kubernetes Ingress resource used for?

A. Managing storage
B. Load balancing
C. Scheduling pods
D. Resource scaling
Answer: B

7. Which Kubernetes resource is used to scale the number of pods dynamically based on resource utilization?

A. Deployment
B. Pod
C. Service
D. ReplicaSet
Answer: A

8. What is the purpose of a ConfigMap in Kubernetes?

A. Storing container images
B. Managing environment variables
C. Managing secrets
D. Scaling pods
Answer: B

9. Which Kubernetes component is responsible for scheduling pods to nodes?

A. Kubelet
B. Kube-proxy
C. Control Plane
D. Scheduler
Answer: D

10. How does Kubernetes achieve self-healing for pods?

A. By automatically restarting failed pods
B. By notifying administrators of issues
C. By deleting failed pods
D. By rolling back to a previous version
Answer: A

11. What is a StatefulSet in Kubernetes used for?

A. Managing stateless applications
B. Managing stateful applications
C. Running system processes
D. Managing external databases
Answer: B

12. Which resource is used to create and manage network policies in Kubernetes?

A. NetworkPolicy
B. PodNetwork
C. ServiceMesh
D. IngressController
Answer: A

13. What is the purpose of a Helm chart in Kubernetes?

A. Managing storage
B. Managing secrets
C. Defining the desired application structure
D. Scaling pods
Answer: C

14. What is etcd in a Kubernetes cluster?

A. The control plane component responsible for scheduling
B. The container runtime
C. The distributed key-value store for cluster data
D. The network overlay plugin
Answer: C

15. Which Kubernetes resource is used to manage horizontal scaling based on CPU or memory usage?

A. Deployment
B. StatefulSet
C. HorizontalPodAutoscaler
D. ReplicaSet
Answer: C

16. What is a DaemonSet in Kubernetes used for?

A. Managing stateful applications
B. Ensuring a specified number of replicas
C. Running a pod on every node in the cluster
D. Managing environment variables
Answer: C

17. Which command is used to create a new Kubernetes cluster using kubeadm?

A. kubectl create cluster
B. kubeadm init
C. kubectl init cluster
D. kube-up
Answer: B

18. What is the purpose of a Helm release in Kubernetes?

A. Installing and managing Helm charts
B. Managing node resources
C. Defining pod lifecycles
D. Creating load balancers
Answer: A

19. What is the role of a Persistent Volume (PV) in Kubernetes?

A. Storing container images
B. Managing environment variables
C. Providing storage that persists beyond the lifecycle of a pod
D. Scheduling pods
Answer: C

20. Which Kubernetes resource allows you to inject configuration data into a pod at runtime?

A. Secret
B. ConfigMap
C. PodVolume
D. HelmChart
Answer: B

21. What is the purpose of the Kubernetes container runtime interface (CRI)?

A. It defines the API for Kubernetes controllers
B. It provides an interface for external storage systems
C. It defines how Kubernetes interacts with container runtimes
D. It specifies the structure of container images
Answer: C

22. How does Kubernetes manage container communication within a pod?

A. By using a shared network namespace
B. By creating a separate network namespace for each container
C. By assigning unique IP addresses to each container
D. By using DNS for inter-container communication
Answer: A

23. What is the primary role of the Kubernetes API server?

A. Storing configuration data
B. Authenticating users
C. Scheduling pods
D. Providing an interface to interact with the cluster
Answer: D

24. Which Kubernetes resource allows you to inject sensitive data into a pod securely?

A. Secret
B. ConfigMap
C. Service
D. Ingress
Answer: A

25. What is the purpose of the Kubernetes control plane?

A. Managing container runtime
B. Scheduling pods
C. Running user applications
D. Managing the cluster's state and configuration
Answer: D

26. Which Kubernetes resource is used to manage network policies for pod-to-pod communication?

A. Ingress
B. ServiceMesh
C. NetworkPolicy
D. PodNetwork
Answer: C

27. How does Kubernetes handle rolling updates for applications?

A. It stops all pods and updates them simultaneously
B. It rolls out updates to a subset of pods at a time
C. It creates a new cluster for each update
D. It updates pods in random order
Answer: B

28. What is the purpose of a liveness probe in a Kubernetes pod specification?

A. To check if the pod is alive
B. To determine the desired number of replicas
C. To restart the pod in case of failure
D. To manage environment variables
Answer: C

29. Which Kubernetes resource is used to manage authentication and authorization in the cluster?

A. ServiceAccount
B. Role
C. RoleBinding
D. Service
Answer: B

30. How does a Kubernetes StatefulSet ensure that pod identities persist across rescheduling?

A. By using random pod names
B. By creating a new pod identity on rescheduling
C. By generating pod names based on their ordinal index
D. By using the same pod name for all replicas
Answer: C

31. What is the primary purpose of the Kubernetes Kubelet component?

A. Managing container images
B. Authenticating users
C. Running pods on worker nodes
D. Managing network policies
Answer: C

Top comments (0)