Head over to the below posts in the series if you want to skip this one.
Kubernetes Overview: Part-2 [Pod, Deployment, Service, Ingress, and Ingress controller]
Deploy a react app in Kubernetes [ Install kubectl, minikube, create and dockerise a react app and deploy it in kubernetes ]
What is Kubernetes?
Kubernetes is an open-source platform for managing containerized workloads and services. But, it's kind of a weird name if you ask me. A little bit of googling helped me understand what it means.
The name Kubernetes originates from Greek, meaning helmsman or pilot.
Google open-sourced the Kubernetes project in 2014 and is now maintained by Cloud Native Computing Foundation (CNCF). It has a large and growing ecosystem.
Why Kubernetes?
I know what you're thinking.. 'Okay!, So it manages containers. But how does that help me?'.
Kubernetes provides you with a framework to run distributed systems resiliently. It takes care of scaling and failover for your application, provides deployment patterns, and more.
It helps you with
Service discovery and load balancing: Kubernetes can expose a container using the DNS name or using their IP address. If there is a lot of traffic going to a container, Kubernetes can load balance and distribute it to keep the deployment stable.
Self-healing: When containers fail, Kubernetes restarts them, replaces them, kills them when they don't respond to a user-defined health check, and waits to advertise them to clients until they are prepared to serve.
Automated rollouts and rollbacks: With Kubernetes, you may specify the desired state for your deployed containers, and it will gradually convert the current state to the desired state. For instance, Kubernetes can be automated to build new containers for your deployment, remove any already present containers, and adopt all of the resources from the old containers to the new ones.
and many more such features...
Kubernetes Components
Kubernetes Components can be categorised as Control Plane components and Node components.
Control Plane Components
Control plane is responsible for the overall management of the cluster, detecting and responding to cluster events, and works with other nodes as well.
API server
The API server is a component of the Kubernetes control plane that exposes the Kubernetes API. The API server is the front end for the Kubernetes control plane.
etcd
Consistent and highly-available key value store used as Kubernetes' backing store for all cluster data.
kube-scheduler
This is the Control plane component that watches for newly created Pods with no assigned node and selects a node for them to run on.
kube-controller-manager
Control plane component that runs controller processes such as Node controller, Job controller, EndpointSlice controller, ServiceAccount controller.
cloud-controller-manager
This component embeds cloud-specific control logic. It lets you link your cluster into your cloud provider's API, and separates the components that interact with that cloud platform from components that only interact with your cluster.
You will not find this if you have kubernetes running on your local machine.
Node Components
kubelet
kubelet is an agent that runs on each node in the cluster. It makes sure that containers are running in a Pod.
The kubelet takes a set of PodSpecs that can be provided through various mechanisms and ensures that the containers described in those PodSpecs are running and healthy.
kube-proxy
kube-proxy is a network proxy that runs on each node in your cluster, implementing part of the Kubernetes Service concept [ more on that in the next part ].
kube-proxy maintains network rules on nodes. These network rules allow network communication to your Pods from network sessions inside or outside of your cluster.
This should be a sufficient overview of kubernetes and hopefully answers the below questions.
What is Kubernetes?
Why is kubernetes used?
What are Kubernetes components?
Hop on to the next part of this series, which will talk about concepts like Pod, Deployment, Service, Ingress, and Ingress controller that are super important when it comes to hands-on with Kubernetes.