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.

Similar Reads

1. Pods

Pod is the smallest or fundamental component of a Kubernetes architecture. One very important feature of Pod is that it is ephemeral. This means that if a Pod fails, then Kubernetes can automatically create its new replica....

2. Virtual Network

Virtual Network is the component of Kubernetes which enables the worker nodes and the master nodes to talk to each other. Virtual Network actually turns all the nodes inside of the cluster into one powerful machine that has the sum of all the resources of individual nodes....

3. IP addresses

In Kubernetes, inside the virtual network, each Pod gets its own IP address (note that Pod gets the IP address not the container) and each Pod can communicate with each other using that IP address....

4. Service

The official definition on services says that “a Service is a method for exposing a network application that is running as one or more Pods in your cluster.” Service is basically a static IP address or permanent IP address that can be attached to the Pod. That means that “my app” will have its own Service and database Pod will have its own Service....

5. Ingress

The official definition of Ingress says “Ingress is an API object that manages external access to the services in a cluster”....

6. Config Map

Config Map is the external configuration to your application. Config Map usually contains configuration data like URLs of database or URLs of some other services that we are using....

6. Secret

Secret is just like config map but the difference is that it’s used to store secret data credentials and it stores this data not a plain text format but in base64 encoded format....

7. Volumes

A Volume in Kubernetes is a data storing feature with the help of which we can store data that is persistent and can be accessed by containers in a Kubernetes pod....

8. Deployment

Deployment are the Kubernetes component that manages the replication and lifecycle of the Pods in the Kubernetes Cluster....

9. StatefulSet

StatefulSets are the Kubernetes component that manages the replication and lifecycle of the Pods in the Kubernetes Cluster but specifically for Stateful applications....

Conclusion

The best way to understand the Kubernetes architecture is to first start with all the components of Kubernetes and how they work. Make sure to go through all the Kubernetes Components we discussed in this article before you learn about the Kubernetes architecture in order to understand it in a more comprehensive way....

FAQs on Fundamental Kubernetes Components and their role in Container Orchestration:

1. What is the use of Virtual Network?...

Contact Us