Quiz Details
QZ-20251227-14318
Topics:
Kubernetes Interview questions
Difficulty:
Level 5 - Very Hard
Questions:
18
Generated:
December 27, 2025 at 06:19 PM
Generated by:
Guest User
Instructions: Select an answer for each question and click "Check Answer" to see if you're correct. Then view the explanation to learn more!
1 What is the primary purpose of the Kubernetes API server?
Correct Answer:
A
Explanation: The Kubernetes API server is the central component that manages the state of the cluster, handling requests and exposing the API for other components.
Explanation: The Kubernetes API server is the central component that manages the state of the cluster, handling requests and exposing the API for other components.
2 Which Kubernetes object is responsible for managing a set of identical Pods?
Correct Answer:
C
Explanation: A ReplicaSet is responsible for ensuring that a specified number of pod replicas are running at all times, thus managing a set of identical Pods.
Explanation: A ReplicaSet is responsible for ensuring that a specified number of pod replicas are running at all times, thus managing a set of identical Pods.
3 What command is used to view logs for a specific Pod in Kubernetes?
Correct Answer:
A
Explanation: The command 'kubectl logs <pod-name>' is used to fetch logs from the specified Pod, allowing users to troubleshoot and monitor applications.
Explanation: The command 'kubectl logs <pod-name>' is used to fetch logs from the specified Pod, allowing users to troubleshoot and monitor applications.
4 In Kubernetes, what is the role of a Service?
Correct Answer:
C
Explanation: A Service in Kubernetes is an abstraction that defines a logical set of Pods and a policy by which to access them, effectively exposing applications running on Pods.
Explanation: A Service in Kubernetes is an abstraction that defines a logical set of Pods and a policy by which to access them, effectively exposing applications running on Pods.
5 What does the 'kubectl apply' command do?
Correct Answer:
D
Explanation: The 'kubectl apply' command updates a resource by applying the configuration in the specified file, ensuring that the current state matches the desired state.
Explanation: The 'kubectl apply' command updates a resource by applying the configuration in the specified file, ensuring that the current state matches the desired state.
6 Which of the following is a valid type of Kubernetes Service?
Correct Answer:
D
Explanation: Kubernetes supports multiple types of Services, including LoadBalancer, ClusterIP, and NodePort, each serving different use cases for application exposure.
Explanation: Kubernetes supports multiple types of Services, including LoadBalancer, ClusterIP, and NodePort, each serving different use cases for application exposure.
7 What is the purpose of a Kubernetes Ingress?
Correct Answer:
C
Explanation: An Ingress in Kubernetes is used to manage external access to the services in a cluster, typically HTTP, allowing for routing based on URL paths.
Explanation: An Ingress in Kubernetes is used to manage external access to the services in a cluster, typically HTTP, allowing for routing based on URL paths.
8 How does Kubernetes handle Pod scheduling?
Correct Answer:
C
Explanation: Kubernetes schedules Pods based on resource requests (CPU, memory) and the availability of those resources in the cluster, optimizing for performance.
Explanation: Kubernetes schedules Pods based on resource requests (CPU, memory) and the availability of those resources in the cluster, optimizing for performance.
9 What is the purpose of a ConfigMap in Kubernetes?
Correct Answer:
B
Explanation: A ConfigMap in Kubernetes is used to store non-confidential configuration data in key-value pairs, allowing applications to consume configuration from environment variables or command-line arguments.
Explanation: A ConfigMap in Kubernetes is used to store non-confidential configuration data in key-value pairs, allowing applications to consume configuration from environment variables or command-line arguments.
10 Which component is responsible for the scheduling of Pods onto Nodes in Kubernetes?
Correct Answer:
A
Explanation: The kube-scheduler is responsible for scheduling Pods onto Nodes based on resource availability, constraints, and policies defined in the cluster.
Explanation: The kube-scheduler is responsible for scheduling Pods onto Nodes based on resource availability, constraints, and policies defined in the cluster.
11 What does Helm do in the Kubernetes ecosystem?
Correct Answer:
A
Explanation: Helm is a package manager for Kubernetes that allows users to define, install, and upgrade applications using charts, which are collections of resources.
Explanation: Helm is a package manager for Kubernetes that allows users to define, install, and upgrade applications using charts, which are collections of resources.
12 Which of the following is NOT a valid Kubernetes volume type?
Correct Answer:
A
Explanation: fileSystem is not a valid Kubernetes volume type. Valid types include emptyDir, hostPath, and persistentVolumeClaim, among others.
Explanation: fileSystem is not a valid Kubernetes volume type. Valid types include emptyDir, hostPath, and persistentVolumeClaim, among others.
13 What does the 'kubectl delete' command do?
Correct Answer:
A
Explanation: The 'kubectl delete' command removes a specified resource from the cluster, effectively stopping and deleting the associated Pods.
Explanation: The 'kubectl delete' command removes a specified resource from the cluster, effectively stopping and deleting the associated Pods.
14 Which Kubernetes object provides a guarantee of ordering and uniqueness for Pods?
Correct Answer:
C
Explanation: A StatefulSet provides guarantees about the ordering and uniqueness of Pods, making it suitable for applications that require stable identities.
Explanation: A StatefulSet provides guarantees about the ordering and uniqueness of Pods, making it suitable for applications that require stable identities.
15 What is the purpose of Network Policies in Kubernetes?
Correct Answer:
B
Explanation: Network Policies are used in Kubernetes to control the traffic flow between Pods, allowing users to define rules for ingress and egress traffic.
Explanation: Network Policies are used in Kubernetes to control the traffic flow between Pods, allowing users to define rules for ingress and egress traffic.
16 What is a Custom Resource Definition (CRD) in Kubernetes?
Correct Answer:
B
Explanation: A Custom Resource Definition (CRD) allows users to extend Kubernetes capabilities by defining their own API objects, enabling custom resource management.
Explanation: A Custom Resource Definition (CRD) allows users to extend Kubernetes capabilities by defining their own API objects, enabling custom resource management.
17 What is the main purpose of the Kubernetes Controller Manager?
Correct Answer:
D
Explanation: The Kubernetes Controller Manager is responsible for regulating the state of the system, ensuring that the desired state of the cluster matches the actual state.
Explanation: The Kubernetes Controller Manager is responsible for regulating the state of the system, ensuring that the desired state of the cluster matches the actual state.
18 Which command would you use to scale a Deployment to 5 replicas?
Correct Answer:
B
Explanation: The command 'kubectl scale deployment <deployment-name> --replicas=5' is used to scale the specified Deployment to a desired number of replicas.
Explanation: The command 'kubectl scale deployment <deployment-name> --replicas=5' is used to scale the specified Deployment to a desired number of replicas.