Top Kubernetes Interview Questions (2024) | TechGeekNext


Top Kubernetes Interview Questions (2024)

  1. What is Kubernetes?
  2. How Kubernetes works?
  3. What is the difference between Docker container and Kubernetes?
  4. What are the components of a Kubernetes service?
  5. What is Kubernetes Cluster?
  6. How to verify Kubernetes cluster?
  7. What is the maximum number of nodes in a Kubernetes cluster?
  8. How do Pods interact with each other in Kubernetes?
  9. How do a frontend pod and a backend pod interact in Kubernetes?
  10. How to find the IP address of a Pod in Kubernetes?

Q: What is Kubernetes?
Ans:

Kubernetes is an open-source container orchestration platform that allows the operation of a cloud application's elastic web server framework. Kubernetes can also be used to support data centre outsourcing to public cloud service providers or for large-scale web hosting.

Q: How Kubernetes works?
Ans:

A working Kubernetes deployment is a cluster. A Kubernetes cluster is divided into two parts: the control plane and the compute machines, or nodes. Each node is a separate Linux environment that can be either physical or virtual. Pods, which are mainly composed of containers, run on each node.

To understand in details refer How Kubernetes works/architecture

Kubernetes Architecture
Checkout our related posts :

Q: What is the difference between Docker container and Kubernetes?
Ans:

  1. Docker is a platform and tool that allows users to build, distribute, and run Docker containers. It comes with its own native clustering tool for orchestrating and scheduling containers across machine clusters. Kubernetes is a container orchestration system for Docker containers that is more comprehensive than Docker Swarm and is designed to efficiently coordinate large clusters of nodes in production.
  2. Docker runs on a single node, while Kubernetes is designed to run across a cluster.
  3. Another difference between Kubernetes and Docker is that Docker can be utilised without Kubernetes, however Kubernetes requires the use of a container runtime to orchestrate.
Although Kubernetes and Docker are essentially different technologies, they complement each other well and make container management and deployment easier in a distributed architecture.

Q: What is Kubernetes Cluster?
Ans:

Kubernetes manages a cluster of highly available computers that work together as a single unit.
Kubernetes is a container orchestration platform that automates the distribution and scheduling of application containers across a cluster. Kubernetes is a production-ready open-source platform.

There are two types of resources in a Kubernetes cluster:

  1. The cluster is coordinated via the Control Plane.
  2. Applications are run by nodes, which are worker nodes.

The Control Plane is in charge of cluster management.
In a Kubernetes cluster, a node is a virtual machine (VM) or a physical computer that operates as a worker machine.
The Kubernetes API is used by the nodes to communicate with the control plane.

Q: How to verify Kubernetes cluster?
Ans:

Kubernetes uses kubectl to manage apps, use the below command to verify the nodes running the Kubernetes cluster.

 kubectl get nodes

Q: What is the maximum number of nodes in a Kubernetes cluster?
Ans:

As per Kubernetes documentation, A cluster is a collection of nodes (physical or virtual machines) that are managed by the control plane and run Kubernetes agents. Kubernetes v1.22 allows for clusters of up to 5000 nodes.

Kubernetes is designed to support configurations that fulfil all of the following criteria:

  1. No more than 110 pods per node
  2. No more than 5000 nodes
  3. No more than 150000 total pods
  4. No more than 300000 total containers

Q: How do Pods interact with each other in Kubernetes?
Ans:

Each Pod in Kubernetes has its own IP address. A Pod can interact with another Pod by specifically addressing its IP address, however Services is the preferred approach. A Service is a collection of Pods that can be accessed via a single, fixed DNS name or IP address.

Q: How do a frontend pod and a backend pod interact in Kubernetes?
Ans:

We could have a frontend application that communicates with a backend. An API or a database can serve as the backend. There will be two Pods in Kubernetes, one for the frontend and one for the backend.

Will not use IP address communication because IP addresses may change after the Pod is restarted; instead, will use a service-based approach to communicate between the Frontend and Backend Pods. Pods are typically communicate with each other via a Service.

Q: How to find the IP address of a Pod in Kubernetes?
Ans:

We can find the IP Address of a Pod using oc get pods command.








Recommendation for Top Popular Post :