Skip to main content

Command Palette

Search for a command to run...

Day 32 Task: Launching your Kubernetes Cluster with Deployment

Published
1 min read
Day 32 Task: Launching your Kubernetes Cluster with Deployment
S

Hi! My name is Safia Khatoon. I am complete my Bachelors in Technology from RTC Institute Of Technology. My specialisation in Computer Science and Engineering.I love contributing to Open Source with the help of the skills I gain.

Also, I'm working on my YouTube Channel as well where I teach about DevOps tools and make technical content. You can have a look at it through my profile.

Feel free to reach out to me! I'd be happy to connect with you.

Congratulation ! on your learning on K8s on Day-31

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.

Today's task let's keep it very simple.

Task-1:

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

  • add a deployment.yml file (sample is kept in the folder for your reference)

  • apply the deployment to your k8s (minikube) cluster by command kubectl apply -f deployment.yml

    add a deployment.yml file.

  • apply the deployment to your k8s (minikube) cluster by command kubectl apply -f deployment.yml.

    kubectl get pods --namespace=react-django-app

Now delete the pod by using command “kubectl delete pods — namespace <namespace_name> <pod_name>”. The deleted node will revive again or we can call this auto-healing.

kubectl delete pods django-app-deployment-8564d6c7d9-7pcvh -n=react-django-app

Thank you for reading this blog. Hope it helps.

— Safia Khatoon

Happy Learning :)

M

Assalamalikum aap personal me help kr sakte ho Kuch doit clear krna hai

More from this blog

Untitled Publication

136 posts

Day 32 Task: Launching your Kubernetes Cluster with Deployment