Top Kubernetes Interview Questions And Answers
Top Answers to Kubernetes Interview Questions
First let us compare Kubernetes with Docker Swarm
Kubernetes is a container orchestration tool that is used for automating the managing, monitoring, scaling and deploying of containerized applications. It creates groups of containers that can be logical discovered and managed for easy operations on containers.
With container orchestration tool Kubernetes, it becomes extremely easy to handle the containers. You can respond to customer demands by deploying the applications faster and in a more predictable manner.
Here we will list some of the benefits of Kubernetes:
- Automatic scheduling
- Automated rollback
- Horizontal scaling
- Auto healing capabilities.
Docker Swarm is the default container orchestration tool that comes with Docker. Docker Swarm can only orchestrate simple Docker containers. Kubernetes on the other hand helps to manage much more complex software application containers. Kubernetes offers support for larger demand production environment.
Application orchestration in software process means you can integrate two or more applications. You will be able to automate arrangement, coordination and management of computer software. The goal of any orchestration process is to streamline and optimize frequent repeatable processes.
The Kubernetes namespace is used in the environment wherein you have multiple users spread in geographically vast areas and working on multiple projects. What the namespace does is divide the cluster resources between multiple users.
You can think of Kubernetes Pod as a group of containers that are run on the same host. So if you regularly deploy single containers then your container and Pod will be one and the same.
A node in Kubernetes is a worker machine which is also known as a minion. This node could be a physical machine or a virtual machine. For each of the node there is a service to run pods and it is managed by master components. The node services could include kubelet, kube-proxy and so on.
The Heapster lets you do the container cluster monitoring.It lets you do cluster-wide monitoring and event data aggregation. It has native support for Kubernetes.
A container cluster lets you place and manage the containers in a dynamic setup. It can be considered as a set of nodes or Compute Engine instances. The API server of the Kubernetes does not run on cluster nodes but instead the Container Engine hosts the API server.
You can think of Kubelet as the lowest level component in a Kubernetes. The Kubelet is responsible for making the individual machines to run. The sole purpose of a Kubelet is given a set of containers, it has to ensure that they are all running.
The Minikube makes it easy for the local running of Kubernetes. Within a Virtual Machine, the Minikube runs a single-node Kubernetes cluster.
The Kubectl is a Kubernetes command line tool that is used for deploying and managing applications on Kubernetes. The Kubectl is especially useful for inspecting the cluster resources, for creating, updating and deleting the components.
The Gke is a Google Kubernetes Engine which is used for managing and orchestrating systems for Docker containers. The Gke also lets you orchestrate container clusters within the Google Public Cloud as well.
The Kube proxy runs on each of the node. It can do simple tasks like TCP, UDP Forwarding and so on. It shows the services in the Kubernetes API on each node.
The components of the Kubernetes Master include the API server, the controller manager, Scheduler, and the etc components. The Kubernetes Master components are responsible for running and managing the Kubernetes cluster.
It is the Kubernetes controller manager. The kube-controller-manager is a daemon that embeds the core control loops which regulates system state and it is a non-terminating loop.
The process of load-balancing will let you expose the services. There are two types of load-balancing when it comes to Kubernetes.
Internal load balancing: This is used for balancing the loads automatically and allocating the pods with the required configuration.
External load balancing: This directs the traffic from external loads to the backend pods.
The Kube-scheduler has to job of assigning the nodes to the newly created pods.
The primary data store of Kubernetes is etcd which is responsible for all Kubernetes cluster data store.
Kubernetes Master assigns a new IP address.
You can set a static IP for Kubernetes load balancer by changing the DNS records every time the