Kubernetes Interview Questions and Answers
Intermediate / 1 to 5 years experienced level questions & answers
Ques 1. Explain the key components of Kubernetes architecture.
Key components include Master Node (API server, Controller manager, Scheduler), Worker Node (Kubelet, Kube Proxy), and etcd (distributed key-value store).
Ques 2. Explain Kubernetes Pods and how they communicate with each other.
Pods share the same network namespace, allowing them to communicate via localhost. They can also use Services for communication, which provides a stable IP and DNS name for a set of Pods.
Ques 3. Explain Kubernetes Services and their types.
Services provide a stable endpoint for accessing a set of Pods. Types include ClusterIP (internal to the cluster), NodePort (exposes service on each node's IP), and LoadBalancer (provides an external IP and routes traffic to the service).
Ques 4. What is Kubernetes Ingress?
Ingress is an API object that manages external access to services within a cluster. It provides HTTP and HTTPS routing to services based on rules specified by the user.
Ques 5. What is a Kubernetes ConfigMap?
A ConfigMap is a Kubernetes resource that allows you to decouple configuration artifacts from the container image, making it easier to manage configurations for different environments.
Ques 6. Explain the purpose of a Kubernetes Secret.
A Secret is used to store sensitive information such as passwords, API keys, and tokens. It ensures that confidential data is not exposed in the configuration or environment variables.
Ques 7. What is the role of Kubernetes Controllers?
Controllers in Kubernetes are control loops that regulate the state of the system. Examples include ReplicaSet (ensures a specified number of replicas), and StatefulSet (maintains stateful applications).
Ques 8. What is Kubernetes RBAC (Role-Based Access Control)?
RBAC is a Kubernetes feature that provides a flexible system for defining roles and permissions within a cluster. It allows administrators to control access to resources based on roles and role bindings.
Ques 9. Explain the concept of Horizontal Pod Autoscaling (HPA) in Kubernetes.
HPA automatically adjusts the number of replica Pods in a deployment based on observed CPU utilization or custom metrics. It ensures optimal resource utilization and application performance.
Ques 10. What is the purpose of the Kubernetes Init Container?
An Init Container is a specialized container that runs before the main application container starts. It is often used for setup tasks, such as database migrations or configuration fetching.
Ques 11. Explain the concept of Pod Affinity in Kubernetes.
Pod Affinity is a way to influence the scheduling of Pods based on the presence of other Pods. It allows you to ensure that Pods are co-located or spread across nodes.
Ques 12. What is the purpose of Kubernetes Helm Releases?
A Helm Release is an instance of a Helm Chart deployed in a Kubernetes cluster. It represents a specific configuration of the application and can be upgraded, rolled back, or deleted independently.
Ques 13. Explain the concept of Kubernetes Taints and Tolerations.
Taints are used to repel Pods from nodes, while tolerations allow Pods to schedule on nodes with specific taints. This helps in dedicating nodes to specific workloads.
Ques 14. What is a Kubernetes Helm Release Chart?
A Helm Release Chart is a package of pre-configured Kubernetes resources for deploying and managing an application using Helm. It includes templates for various resources like Pods, Services, and ConfigMaps.
Most helpful rated by users: