Deployment
Deployment are the Kubernetes component that manages the replication and lifecycle of the Pods in the Kubernetes Cluster.
In our current example, what happens if our application Pod dies, crashes or I have to restart the Pod because I built a new container image? What happens is that we will have a downtime where the users will not be able to reach our application. This is a terrible thing if it happens in production.
Role of Deployment
The role of StatefulSets and Deployment is exactly this. When using distributed systems and containers, instead of relying on just one application Pod and one database Pod etc. We can replicate everything on multiple servers, so we would have another node where a replica or clone of our application would run which will also be connected to the Service. Previously we discussed that the service is like an persistent static IP address with a DNS name so that you don’t have to constantly adjust the end point when pod dies. The Service is also a load balancer which means that the service will actually catch the request and forward it to whichever Pod is the least busy.
In order to create the second replica of the my application pod we will not create a second Pod rather we will define a blueprint in our application Pod and specify how many replicas of that pod we want to run. That component or that blueprint in Kubernetes is called Deployment. Actually we don’t even work with Pods or create Pods, we rather create creating Deployments and StatefulSets and there we can specify how many replicas we want and we can scale up or scale down number of replicas of Pods.
Therefore we can say that Pod is a layer of abstraction on top of containers and Deployment is another abstraction on top of Pods which makes it more convenient to interact with the Pods, replicate them and do some other configuration. Now if one of the replicas of our replication Pod would die, the Service will forward the requests to another one so our application would still be accessible for the user.
Fundamental Kubernetes Components and their role in Container Orchestration
Kubernetes or K8s is an open-sourced container orchestration technology that is used for automating the manual processes of deploying, managing and scaling applications by the help of containers. Kubernetes was originally developed by engineers at Google and In 2015, it was donated to CNCF (Cloud Native Computing Foundation)
To understand Kubernetes, one must understand its basic components and its building blocks. In this article, we will be discussing the most fundamental components of Kubernetes as well as what are they used for.
Kubernetes has tons of components but most of the time we are going to be working with just a handful of them. Following is the list of all the important components of Kubernetes along with their roles in Kubernetes.
Contact Us