What is Deployment in k8s?
A Deployment serves as a setup for updating configurations for Pods and ReplicaSets.
Within a Deployment, you outline the intended condition, and the Deployment Controller actively adjusts the current condition to match the desired state gradually. Deployments can be specified to generate additional replicas for scaling purposes or to replace existing Deployments by transferring all their resources to new Deployments.
Task-1:
Create one Deployment file to deploy a sample todo-app on K8s using the "Auto-healing" and "Auto-Scaling" feature
-Will create deploy.yaml file where we update replica as 3.
- apply the deployment to k8s cluster by command kubectl apply -f deploy.yaml
-Verify the deployment with pod command (As we have mentioned 2 replica in YAML file we can see 2 pod's created)
-We could see container details on the worker-node using docker ps -a
Thanks,
Kishor Chavan