1) What is Kubernetes? / What do you understand by Kubernetes?
Kubernetes is an open-source container-orchestration tool or system used to automate tasks such as the management, monitoring, scaling, and deploying containerized applications.
2) What is the use of Kubernetes?
Kubernetes is mainly used to easily manage several containers (since it can handle the grouping of containers), which provides logical units that can be discovered and managed.
3) What are K8s?
K8s is nothing but just another term for Kubernetes.
4) Who was the inventor of Kubernetes?
Kubernetes was initially designed and developed by Google and is now maintained by the Cloud Native Computing Foundation.
5) What was the main motive behind the development of Kubernetes?
The main motive behind the development of Kubernetes is to provide a “platform for automating deployment, scaling, and operations of application containers across clusters of hosts.”
6) What is the relation between Docker and Kubernetes?
Docker is an open-source platform used to handle software development. It is mainly used to package the settings and dependencies that the software/application needs to run into a container, which allows for portability and several other advantages. On the other hand, Kubernetes is used to allow the manual linking and orchestration of several containers, running on multiple hosts that have been created using Docker.
7) What do you understand by the term orchestration when it comes to software and DevOps?
The term orchestration specifies integrating multiple services that allow them to automate processes or synchronize information in a specific time sequence.
For example, suppose we have six or seven microservices for an application to run, then if you place them in separate containers, this would inevitably create obstacles for communication. Using orchestration, we can do it quickly to enable all services in individual containers to work seamlessly to accomplish a single goal.
8) What are the key differences between the Docker Swarm and Kubernetes?
Docker Swarm is an open-source container orchestration platform used to cluster and schedule Docker containers. It is a native of Docker. Following is the list of key differences between the Docker Swarm and Kubernetes:
Docker Swarm
Kubernetes
Docker Swarm is easy and convenient to set up, but it doesn’t have a robust cluster.
Kubernetes is more complicated than Docker Swarm to set up, but it assures a robust cluster.
Docker Swarm can’t do auto-scaling as the Kubernetes can do, but Docker’s scaling is five times faster than Kubernetes.
Kubernetes can do auto-scaling, but scaling is slower than Docker Swarm.
Docker Swarm doesn’t provide a GUI.
Kubernetes provides a GUI in the form of a dashboard.
Docker Swarm provides an automatic load balancing feature of traffic between containers in a cluster.
It requires manual intervention in Kubernetes for load balancing such traffic.
Docker requires third-party tools such as the ELK stack for logging and monitoring.
Kubernetes provides such integrated tools for logging and monitoring purposes.
In Docker Swarm, we can easily share storage volumes with any container.
In Kubernetes, we can only share storage volumes with containers in the same pod.
We can deploy rolling updates in Docker Swarm but can’t deploy automatic rollbacks.
In Kubernetes, we can deploy rolling updates as well as automatic rollbacks.
9) What do you understand by a node in Kubernetes?
In Kubernetes, a node is the smallest unit of hardware. It is used to define a single machine in a cluster that can act as a virtual machine from a cloud provider or physical machine in the data center. Every machine of the Kubernetes cluster can act as a substitute for other machines.
10) What is the use of a Kubernetes Kube-scheduler?
A Kube-scheduler is the default scheduler for Kubernetes. It is used to assign nodes to newly created pods.
11) What do you understand by daemon sets in Kubernetes?
Daemon sets are sets of pods that run on a host and are used for host layers attributes like monitoring network or simple network.
12) What is Heapster in Kubernetes?
A Heapster is a metrics collection and performance monitoring system for data collected by the Kublet.
13) What are the main reasons behind using Kubernetes?
Kubernetes is mainly used because of the following reasons:
We can use Kubernetes easily on on-premises bare metal, OpenStack, public clouds Google, Azure, AWS, etc.
Using Kubernetes, we can avoid vendor lock issues as it can use any vendor-specific APIs or services except where Kubernetes provides an abstraction, e.g., load balancer and storage.
It enables applications that need to be released and updated without any downtime.
14) What does the node status contain in Kubernetes?
In Kubernetes, the main components of a node status are Address, Condition, Capacity, and Info.
15) What is the Kubernetes Network Policy?
In Kubernetes, the Network Policy specifies how the same namespace’s pods would communicate with each other and the network endpoint.
16) What process is used to run on the Kubernetes Master Node?
The Kube-api server process runs on the Kubernetes Master Node. It is used to scale the deployment of more instances.
17) Which types of systems use Kubernetes?
Kubernetes is the Linux kernel that is used for distributed systems. It provides a consistent interface for applications that use the shared pool of resources.
18) What do you understand by Kubernetes controller manager?
The Kubernetes controller manager is a daemon used for garbage collection, core control loops, and namespace creation. It also enables the running of more than one process on the master node.
19) What is the use of a namespace in Kubernetes?
In Kubernetes, Namespaces are used for dividing cluster resources between users. It is also helpful for more than one user to spread projects or teams and provide a scope of resources.
20) What is a pod in Kubernetes?
In Kubernetes, containers are not run directly so, pods are high-level structures used to wrap one or more containers to make them able to run. Containers in the same pod share a local network and the same resources. That’s why they can easily communicate with other containers in the same pod. In this way, they were on the same machine while maintaining a degree of isolation.
21) What is the role of the Kube-scheduler in Kubernetes?
In Kubernetes, the Kube-scheduler are used to assign nodes to newly created pods.
22) What do you understand by a cluster of containers in Kubernetes?
A cluster of containers is nothing but a set of machine elements or nodes. Clusters specify specific routes so that the containers running on the nodes can communicate with each other. In Kubernetes, the container engine also provides hosting for the API server.
23) What are the different types of controller managers?
Following is the list of different types of controller managers:
Endpoints controller
Service accounts controller
Namespace controller
Node controller
Replication controller
Token controller
24) What is the Google Container Engine? What is its use?
The Google Container Engine is an open-source management platform tailor-made for Docker containers and clusters. It is used to provide support for the clusters that run in Google public cloud services.
25) What is the biggest disadvantage of Kubernetes?
The biggest disadvantages of Kubernetes are listed below:
Security is the biggest issue with Kubernetes. It is not very secure.
Kubernetes dashboard is not very user-friendly.
Kubernetes is very complex to use. That’s why it can reduce productivity.
Kubernetes is costlier than its alternatives.
26) What is kubelet in Kubernetes?
In Kubernetes, the kubelet is a service agent used to control and maintain a group of pods by checking pod specifications. The kubelet runs on each node and makes them able to communicate between a master node and a slave node.
27) What do you understand by the node port service?
The node port service is a way to attain external traffic to your service. It is used to open a particular port on all nodes and forward the network traffic to this port.
28) What is Cluster IP in Kubernetes?
In Kubernetes, the cluster IP is a service inside the cluster that enables other apps to be accessed within the cluster.
29) What are the various services available in Kubernetes?
Following is the list of various services available in Kubernetes:
Cluster IP service
Load Balancer service
Node Port service
External Name Creation service etc.
30) What do you understand by Ingress Network?
Ingress network is a set of rules which allow permission for connections into the Kubernetes cluster.
31) Explain the architecture of Kubernetes with a diagram?
Architectural Diagram:
Kubernetes Interview Questions
Explanation of the critical components used in the diagram:
Master Node: The master node is the first and most crucial component of the Kubernetes’ architecture. It is used to manage the Kubernetes cluster. It is the entry point for all kinds of administrative tasks.
There may be more than one master node in the cluster to check for fault tolerance.
API Server: The API server is an entry point for all the REST commands. It is used to control the cluster.
Scheduler: The scheduler is used to schedule the tasks to the slave node and distribute the workload. It also stores the resource usage information for every slave node.
Etcd: The etcd component is used to store configuration detail and good values. It communicates with the most component and receives commands and work. It is also responsible for managing network rules and port forwarding activity.
Worker/Slave nodes: Worker nodes or Slave nodes are another essential components that contain all the required services to manage the networking between the containers, communicate with the master node, which allows you to assign resources to the scheduled boxes.
Kubelet: It gets the Pod’s configuration from the API server and ensures that the described containers are up and running.
Docker Container: The Docker container runs on each of the worker nodes, which runs the configured pods.
Pods: A pod is specified as a combination of single or multiple containers that logically run together on nodes.
32) What do you understand by Kubectl in Kubernetes? What is it used for?
In Kubernetes, Kubectl is software that is used to control Kubernetes clusters. The ctl in “Kubectl” stands for control, a command-line interface to pass the command to the cluster and manage the Kubernetes component.
33) What do you understand by Kube-proxy in Kubernetes?
In Kubernetes, Kube-proxy is an implementation of both a network proxy and a load balancer. It is used to support service abstraction with other networking operations and responsible for directing traffic to the container depending on IP and the port number.
34) What is the full form of GKE, and what is its use?
The full form of GKE is Google Container Engine. It is a management platform that supports clusters and Docker containers that run within the public cloud services of Google.
Leave a Reply