Kubernetes is a container orchestrator which automates container-based application deployment. It also helps in the auto-scaling of container-based workloads with the help of pods. It is taking over the market mainly because of the below features.
- Speed of deployment
- Quicker upgrade and rollback
- Quicker recovery
There are many attractive features included in Kubernetes we will go through it. Kubernetes is also known as K8s the abbreviation k8s came because in the word Kubernetes the letter ‘k’ followed by 8 letters ( that is ubernete ) and it ends with s. It is,
- K - ubernete - s
- k - 8 - s
- k 8 s
Prerequisite to start Kubernetes?
When you are looking into Kubernetes from an infrastructure perspective you should have a basic understanding of the below-listed items. Without the basic knowledge of this, your journey will be difficult.
- Basic understanding of Docker.
- Familiar with Linux command line operations.
- Basic idea about the networking concepts.
What is Kubernetes?
It is a container orchestration tool, hope you are already familiar with docker if not, please have some basic understanding of docker before getting into the Kubernetes. Like Kubernetes we have Mesos and docker swarm which can act similar to a Kubernetes cluster, the word cluster is not the right fit here, for ease of understanding I am using the word cluster however the right fit is container orchestrator.
The reason behind the adoption of Kubernetes is because of the below factors,
Speed of deployment
Reduces the wait time, minimal time delay between developers hand to Production.
Quicker upgrade and rollback
An easy and quick way to upgrade and roll back the application. ( Version changes will not take much time ).
If the application fails ( I mean in case of any pod failure ), Since Kubernetes deployment has a self-healing option on it, it recreates the failed pod.
This figure gives you an illustration of Kubernetes architecture. It shows how a Kubernetes cluster with all the components tied together.
Kubernetes Architecture Diagram
Control Plane Components ( Master node )
Worker Node Components
Kubernetes in action.
We will take this scenario
- Our developer developed a microservice.
- We will start four containers with this docker image.
- Place an internal load balancer in front of these containers.
- After starting, we understood four images are not sufficient for serving the traffic.
- We will scale it to 6.
- Place a public load balancer in front of these containers.
- Today is new year day traffic spikes.
- Scale the number of containers. Let us increase it to 10.
- Our Dev team added a new feature to the application.
- The business wanted to implement it now since it is the new year day.
- We will implement the change by Keep serving the existing requests during the upgrade without any interruption to the end-user
I will add the demo on another page and provide the link here. I am also planning a video for the same but, it will take some time.