Managing Deployments Using Kubernetes Engine
Managing Deployments Using Kubernetes Engine
07 October 2020
Kubernetes
Kubernetes is an open source container management and orchestration tool for automating deployment, scaling and management of containerized applications. It works with all the cloud windows with all the public cloud vendors or hybrid cloud vendors.
The name Kubernetes originates from Greek, meaning helmsman or pilot. Google open-sourced the Kubernetes project in 2014.
Pod
Pod is the basic unit of Kubernetes. A pod can consist of one or more container images.
- Pod with 1 container image is widely used when a container runs on a physical machine on top of an operating system.
- Pod with 2 or more container images is used for applications which are dependent on other applications/services for their functioning.
Replication Controller
Replication Controller is responsible for managing the pod lifecycle. I.e, it makes sure that the specified number of pod replicas are running at any given point of time.
Replica set
Replica set ensures that the specified number of pod replicas are running at any given point of time.
The main difference between Replica set and Replica controller comes from the support of selectors. Replica set supports Set- based selectors where as Replica controller supports the Equity-based selectors.
Deployment Controller
Deployment provides declarative updates for pods and Replica sets. A desired state can also be described in a deployment. The Deployment Controller changes the actual state to the desired state of the Controller object at a controlled rate.
Creating a deployment
Once a deployment is created the Replica set automatically creates pods in the background.
Update a deployment
Already existing deployment can be updated.
Scale a deployment
Each and every deployment can be scaled up or scaled down based on the requirement.
Pause a deployment
If any problems are detected with a running rollout, pause it to stop the update. If the rollout is paused that means some pods are at the new version and some pods are at the older version. To continue the rollout use the “resume” command.
Rollback Deployment
This is used when the current state of deployment is not stable. If a bug is detected in the new version use the “rollout” command to roll back to the previous version.