Table of Contents
- Why do we need Kubernetes?
- Due to limitations of containers
- Limited scaling but no autoscaling
- Container network maintenance limitation
- No distribution to traffic
- No proper load balancing
- What is Kubernetes?
- A container management tool to handle
- Container deployment
- Auto-scaling of containers
- Proper traffic distribution in container network
- Services of Kubernetes.
- Automatic bin packing
- Service discovery & load balance
- Storage orchestration
- Secret and configuration management
- Batch execution
- Horizontal scaling
- Automatic rollbacks and rollouts
- Kubernetes Architecture
- Working of Kubernetes
- Video Tutorial
1 Why do we need Kubernetes?
Today we will learn about what is Kubernetes and its working but before that, we will learn why Kubernetes is needed in the first place.
a. Due to limitations of containers
There are some limitations in containers. Following are those limitations of containers:
The first limitation is that the scaling configuration of containers is very limited so if we want to scale up the container service which we are using it is taking a bit of manual effort and if the scaling is at a large scale then it’s very difficult to manage to containers.
b. Limited scaling but no autoscaling
In containers, there is no option for autoscaling whether we are using the Docker container or any other container services
c. Container network maintenance limitation
Also, the other drawback of the containers is that the container network maintenance is not present there so if you have the network of containers and you are managing them simultaneously then it’s really difficult to manage those networks of containers.
d. No distribution to traffic
There is no distribution of traffic on those containers so if you want containers to work with each other or you want to flow the traffic from one container to another container then it is not possible in container services.
e. No proper load balancing
- Also, there is no proper load balancing.
- for your example:
- If you have launched an application and you want to transfer the load from one application to another application then it will take a lot of manual effort to set up the configuration for that.
2 What is Kubernetes?
a. container management tool to handle
Kubernetes is an open-source container management tool or we can say that it is a container orchestration tool that means it is used to manage the container services at a very precise scale.
b. Container Deployment
There are many services provided by Kubernetes is like container deployment so basically container deployment means that you are deploying your container at any server using Kubernetes. So, Kubernetes can do the container deployment for you automatically
c. Auto Scaling of containers
Also, it provides a service of auto-scaling of containers, the autoscaling means that if you are scaling up the container from 1 to 100 then it will be done automatically by Kubernetes.
d. Proper traffic distribution in container network
Also, your proper traffic distribution in the container network is possible by using Kubernetes so if some traffic has to be managed between the application then we can usually use Kubernetes for that. Also, load balancing of the container network is possible using Kubernetes so if we want to do load balancing on several containers which we are using in our application network then we also do that.
The Kubernetes states that it was able to resolve the issue which is present in the basic container services like Docker.
3. Services of Kubernetes
a. Automatic bin packing
Automatic bin packing means that Kubernetes automatically pack up your application code into a container, so you don’t have to worry about doing it by yourself it will automatically be doing it for you.
b Service Discovery and Load Balancing
The service discovery and load balancing means are that you will be able to use the container service along with the implementation of load balancing.
c. Storage Orchestration
You will be able to deploy your container using Kubernetes on any storage platform it isAssure or AWS or any other independent storage platform so you don’t have to worry about the platform on which you are deploying your container Kubernetes is will take care of that.
The benefit of using Kubernetes is that it’s a self-healing service that means if the containers fail to run then Kubernetes restart the container for you automatically so that you can use your application services without any problem.
e. Secret and Configuration Management
In case you want to configure the Kubernetes according to your needs you can easily do that at any time and there are several options provided by Kubernetes to do that and it will manage it properly for you.
f. Batch Execution
This service has to users to execute a set of containers at the same time or if you want to manage the containers and if you want to connect the containers which are deployed at the different sever so you can easily do that using batch execution.
g. Horizontal scaling
Horizontal scaling means that scaling your container network from let’s say 10 containers to 100 containers so horizontal scaling means that you can do that without any hassle with the smooth flow of network and traffic on your container with the help of Kubernetes.
h. Automatic Rollbacks and Rollouts
Kubernetes takes care of the new updates which you are rolling out in your application so once there is a new update then Kubernetes will roll out the new version of the application in the container and in case the container fails with the new update then the Kubernetes automatically rollback your application so you have to no worry about checking the container again and again.
4 Kubernetes Architecture
- In the architecture of Kubernetes, the Kubernetes master is the main dashboard of the Kubernetes where you are the controlling the loads and the loads are the image registry.
- So, in the loads your container images are present and to manage the Kubernetes master there are two ways either you use UI (User Interface) or CLI (Command-Line Interface) through an API.
- So, either you can use the Kubernetes dashboard or you can use the command-line interface but the general concept of using the command line interface is that you are more aware of the command which is used to manages the Kubernetes master services.
5 Working of Kubernetes
- In Kubernetes, the master simply has different nodes and on those nodes, there are pods so the master controls the cluster and adds the nodes in it.
- So, once you have a cluster and, in the cluster,several nodesare controlled by a master and node host the containers inside them.
- Containers are inside separate PODs.
- There are different containers present in a POD. These pods then again can transfer the traffic in between them.
- So, they can work with each other on different PODs and you can manage those services in the nodes.
- So, PODs are a logical collection of containers that need to interact with each other for an application.