Day 32 - Launching your Kubernetes Cluster with Deployment

Day 32 - Launching your Kubernetes Cluster with Deployment

ยท

1 min read

What is Deployment in K8s?

In Kubernetes "deployment" refers to a Kubernetes resource and a declarative way to manage the deployment of applications or services in a cluster.

A Kubernetes Deployment is responsible for defining and managing the desired state of a set of replica Pods.

Here are the key aspects of a Kubernetes Deployment:

  1. Desired State

  2. Rolling Updates and Rollbacks

  3. Scaling

  4. High Availability

  5. Self-healing

Task-1: Create one Deployment file to deploy a sample todo-app on K8s using the "Auto-healing" and "Auto-Scaling" feature.

step 1: Setup the k8s cluster with master node and worker node.

Here we are trying to configure the deployment for the container todo-app in todo-deployment.yml

Image is taken from the docker-hub sonalsona/to-do-app

Exposed on the port 3000, with 2 replicas.

step2: Create the deployment using kubectl apply -f todo-deployment.yml

step3: Scale the replicas of deployment if required..

Here i have scaled the replicas to 5, using kubectl scale --replicas=5 deploy/todo-deployment.yml

I hope you find the blog post helpful! If you do, don't forget to like ๐Ÿ‘, comment ๐Ÿ’ฌ, and share ๐Ÿ“ข it with your friends and colleagues.

ย