Introduction to Kubernetes
Question :- What is Kubernetes ?
Answer → This is how we define Kubernetes :-
- Kubernetes is an Open Source Container Orchestration Platform.
- It automates the deployment, scaling and management of containerised applications.
Question :- Let’s talk something about the roots of Kubernetes ?
- Kubernetes can be traced back to Google’s Internal Container Orchestration System, BORG.
- This system managed the deployment of thousands of applications within Google.
- In 2014, Google open-sourced the version of Borg, which is called as Kubernetes.
Question :- What’s the short name of Kubernetes ?
Answer → This is also known by the name of k8s.
Question :- Explain some details about Kubernetes ?
Answer → A k8s cluster is a set of machines, called Nodes. These Nodes are used to run containerised applications.
There are 2 core-pieces in a k8s cluster :-
Component #1.) Control-Pane → It is responsible for managing the state of the cluster.
In Production-environments, the Control-Plane usually runs on multiple nodes, that span across several data-centre zones.
Component #2.) Worker-Nodes → These Nodes run the containerised applications workloads. The containerised applications run in a Pod.
Question :- What is a Pod in Kubernetes ?
Answer → Pods are the smallest deployable units in Kubernetes.
- A Pod hosts one or more containers and provides shared storage networking for those containers.
- Pods are created and managed by the Kubernetes Control Plane. These are the basic building blocks of Kubernetes Application.
Question :- Explain in details about the Control-Plane in Kubernetes ?
Answer → Major components of the k8s Control Plane are :-
Component #1.) API-Server → This is the primary interface between the Control-Plane and the rest of the Cluster. It exposes a RESTful API that allows clients to interact with the control-plane and submit requests to manage the Cluster.
Component #2.) etcd →
- It stands for distributed Key-Value Store.
- It stores the cluster’s persistent state.
- It is used by API-Server and other components of Control-Plane to store and retrieve information about the cluster.
Component #3.) Scheduler → It is responsible for scheduling pods onto the worker nodes in the Cluster. It uses information about the resources required by the pods and the available resources on the worker nodes, to make placement decisions.
Component #3.) Controller Manager → It is responsible for running controllers that manage the state of the cluster. Some examples include :-
- Replication Controller → This ensures the desired number of replicas of a Pod are running.
- Deployment Controller → This manages the rolling update and rollback of deployments.
Component #4.) Worker Nodes → The core components that runs on the Worker-Nodes include :-
- Kubelet → This is a daemon, that runs on each worker node. This is responsible for communicating with the Control-Plane. It receives instructions from the Control-Plane about which pods to run on the node and ensures that desired state of the pods is maintained.
- Container-Runtime → This runs the containers on the worker-nodes. It is responsible for pulling the container-images from the Registry, Starting & stopping the containers and managing the container’s resources.
- Kube-Proxy → This is a Network Proxy, that runs on each worker-node. This is responsible for routing the traffic to the correct pods. It also provides Load-Balancing for the Pods and ensures that traffic is evenly distributed across the pods.
Question :- What are the advantages with Kubernets ?
Answer → There are following advantages of working with Kubernetes :-
- Pool of Features → Kubernetes is Scalable and Highly Available. It provides features like Self-Healing, Automatic Rollbacks and Horizontal Scaling.
- Easy Scaling → It makes it easy to scale our applications up & down as needed, allowing us to respond to changes in demand quickly.
- Kubernetes is Portable → It helps us to deploy and manage applications in a consistent and reliable way, regardless of the underlying Infrastructure. It can very well run at On-Premise, In-Public-Cloud OR In-Hybrid-Environment. It provides a uniform way to package, deploy & manage applications.
Question :- What are the disadvantages with Kubernetes ?
Answer → There are following dis-advantages of working with Kubernetes :-
- Complexity → It is super complex to setup and operate.
- High Cost → The upfront cost is high, especially for the organisations which are new to the containerisation. It requires a certain minimum level of resources to run, in order to support all the features mentioned above.
- High level of Expertise → It requires a high level of expertise and resources to setup and manage a production Kubernetes environment.
It can likely become an overkill for many small organisations.
Question :- How can we make it easy to manage the Kubernetes ?
Answer → One popular option that strikes a reasonable balance is to offload the management of Control-Plane to a Managed-Kubernetes-Service :-
These Services allow Organisations to run on Kubernetes Applications without having to worry about the underlying Infrastructure.
These Services takes care of tasks that require deep expertise, like setting-up and configuring the control-plane, scaling the cluster and providing ongoing maintenance and support.
This way, it is fairly less complex for smaller organisations to try out Kubernetes.
That’s all in this blog. If you liked reading it, do clap on this page. We would see you in next document. Till then bye-bye..