Launching your Kubernetes Cluster with Deployment

Launching your Kubernetes Cluster with Deployment

Understanding Deployments in Kubernetes

In Kubernetes, a Deployment serves as a blueprint for managing updates to Pods and ReplicaSets. You declare the desired state of your application when you define a deployment. The controlled transition from the present state to the intended state is then orchestrated by the Deployment Controller.

This guarantees that upgrades are implemented gradually and with the least amount of disturbance. You have freedom in managing the lifecycle of your application via deployments. They can be used to update already-existing replicas with more recent versions or to scale your application by adding new replicas.

Additionally, deployments facilitate the easy adoption of resources, letting you replace current deployments without sacrificing their resources. Deployments enable Kubernetes users to precisely and reliably define and manage application upgrades, hence enabling effective deployment methods in dynamic contexts.


Create one Deployment file to deploy a sample nginx on K8s using "Auto-healing" and "Auto-Scaling" feature

Step 1: Adding a deployment.yml file

vim deployment.yml

Step 2: Apply the deployment to your k8s (minikube) cluster by command.

kubectl apply -f deployment.yml

Step 3: Checking created pods

kubectl get pods

Step 4: To check all details of pods use following command

kubectl get pods -o wide

Step 5: Checking application running on given IP address

Our application is running successfully.


Follow for more:

Linkedin: https://www.linkedin.com/in/samarjeet-patil-921952251/

#cloud #AWS #k8s #deployment