DEV Community

Archit Sharma
Archit Sharma

Posted on

Top 10 Popular Kubernetes Interview Questions

Preparing for your Kubernetes interview is key to achieving a successful outcome, but understanding what kind of questions or topics are going to be asked is not easy.

So to help you get ready for your upcoming Kubernetes interview, here are 10 technical interview questions about Kubernetes

Questions List

What is the Difference b/w Docker and Kubernetes?

Docker is a container platform where as Kubernetes is a container orchestration environment that offers capabilities like Auto Scaling, Auto Healing, Clustering and Enterprise level support like Load Balancing

What are the main components of Kubernetes architecture?

On a broad level you can divide Kubernetes into two parts:

  1. Control Plane (API SERVER, SCHEDULER, Controller Manager, ETCD, C-CM)
  2. Data Plane (Kubelet, Kube-Proxy, Container Runtime)

What are the main differences between the Docker Swarm and Kubernetes?

Kubernetes is better suited for large organization as it offers more scalability, networking capabilities like policies and huge third party ecosystem support

What is the differences between the Docker container and a Kubernetes pod?

A pod in Kubernetes is a runtime specification of a container in Docker. A pod provides more declarative way of defining using YAML and you can run more than one container in a pod.

What is a namespace in Kubernetes?

Namespace is a logical isolation of resources, network policies, rbac and everything.
For example, there are two projects using same k8s cluster. One project can use ns1 and other project can use ns2 without any overlap and authentication problems.

What is the role of Kube-proxy?

Kube-proxy works by maintaining a set of network rules on each node in the cluster, which are updated dynamically as the services are added or removed. When a client sends a request to a service, the request is intercepted by kube-proxy on the node where it was received. Kube-proxy then looks up the destination endpoint for the service and routes the request accordingly.

Kube-proxy is an essential component of Kubernetes as it ensures that services can communicate with each other.

What are different types of services within Kubernetes?

There are 3 different types of services user can create:

  1. Cluster IP mode
  2. Node Port mode
  3. Load Balancer mode

What is the difference between NodePort and LoadBalencer type service?

When a service is created a NodePort type, The kube-proxy updates the IP Tables with Node IP address and port that is chosen in the service configuration to access the pods.
Where as if you create a Service as type LoadBalancer, the cloud control manager(C-CM) creates a external load balancer IP using the underlying cloud provider logic in the C-CM. Users can access services using the external IP.

What is the role of Kubelet?

Kubelet manages the containers that are scheduled to run on that node. It ensures that the containers are running and healthy, and that the resources they need are available.
Kubelet communicates with the Kubernetes API server to get information about the containers that should be running on the node, and then starts and stops the containers as needed to maintain the desired state. It also monitors the containers to ensure that they are running correctly, and restarts them if necessary.

What are your Day to Day activities on Kubernetes?

As part of our role as a DevOps engineer, We manage the Kubernetes cluster for our organization. We ensure that applications are deployed onto the Kubernetes cluster smoothly and that there are no issues with these applications. To achieve this, we have set up monitoring on our Kubernetes cluster.

Whenever there are bugs in the Kubernetes cluster, such as developers being unable to troubleshoot issues with pods or services, or routing traffic inside the cluster, we, as subject matter experts on Kubernetes, step in to resolve these problems.

We also perform various maintenance activities, such as upgrading the version of worker nodes, installing default mandatory packages, and ensuring that these worker nodes are not exposed to security vulnerabilities. All of these are part of our day-to-day activities.

Additionally, we serve as subject matter experts on Kubernetes within the organization. If anyone has an issue with Kubernetes, they create a Jira item for us to address.

Top comments (0)