What is Deployment in k8s:
A Deployment provides a configuration for updates for Pods and ReplicaSets.
You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new replicas for scaling, or to remove existing Deployments and adopt all their resources with new Deployments.
Task:
Create one Deployment file to deploy a sample todo-app on K8s using "Auto-healing" and "Auto-Scaling" feature
Add a deployment.yml file:
This deployment file will create a deployment with 2 replicas of a container named todo. The container is based on the image Ankitkumarjaiswal23/ddjango-todo-app:latest, which should be replaced with the actual image name of your application. The container listens on port 8000. The deployment is associated with a label app: todo, which is used in the selector to identify the pods that belong to the deployment.
Apply the deployment to your k8s (minikube) cluster
kubectl apply -f deployment.yaml
Thankyou for reading. Happy Learning.