Day 32: Launching your Kubernetes Cluster with Deployment ????

Day 32: Launching your Kubernetes Cluster with Deployment ????

What is Deployment in k8s

Updates for pods and replica sets are configured by a deployment.

When you specify a desired state in a deployment, the deployment controller gradually shifts the current state toward the desired state. You can specify deployments to replace existing deployments and use all of their resources with new deployments or to delete existing deployments and make new replicas for scalability.

Task:

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

Add a deployment.yml file

No alt text provided for this image

This deployment file will deploy a deployment with two copies of the todo container. The container is built using the image vinay0000/ddjango-todo-app:latest, which needs to be changed to reflect the real image name of your application. On port 8000, the container is listening. Todo, a label app connected to the deployment, is utilized in the selection to indicate which pods are a part of it.


Apply the deployment to your k8s (minikube) cluster

kubectl apply -f deployment.yaml        
No alt text provided for this image

To list a deployment:

kubectl get deployments        
No alt text provided for this image

To list a pod

generate two copies of the container in this deployment file.

No alt text provided for this image

Thank you for your time, and good luck with your studies. I'll try to get more into K8s over time. ????

要查看或添加评论,请登录

Vinay Kumar的更多文章

  • DevOps Project - 4 ????

    DevOps Project - 4 ????

    Project Description The project aims to deploy a web application using Docker Swarm, a container orchestration tool…

    7 条评论
  • DevOps Project 3 ????

    DevOps Project 3 ????

    Project Description The project involves hosting a static website using an AWS S3 bucket. Amazon S3 is an object…

    3 条评论
  • DevOps Project -2 ????

    DevOps Project -2 ????

    Project Description The project is about automating the deployment process of a web application using Jenkins and its…

  • Day 80: DevOps Project 1 ????

    Day 80: DevOps Project 1 ????

    Project Description The project aims to automate the building, testing, and deployment process of a web application…

    2 条评论
  • Day 73 - Setup Grafana on AWS EC2 Instance ????

    Day 73 - Setup Grafana on AWS EC2 Instance ????

    Task: Set up grafana in your local environment on AWS EC2. Go to the AWS console and Launch an EC2 instance To enable…

  • Day 72 - Grafana ????

    Day 72 - Grafana ????

    What is Grafana? No matter where your metrics are kept, Grafana is an open-source data visualization and monitoring…

    4 条评论
  • Day71 - Terraform Interview Questions ????

    Day71 - Terraform Interview Questions ????

    1. What is Terraform and how it is different from other IaaC tools? HashiCorp's Terraform is an Infrastructure as Code…

  • Day 70 - Terraform Modules ????

    Day 70 - Terraform Modules ????

    Modules are containers for multiple resources that are used together. A module consists of a collection of .

    4 条评论
  • Day 69 - Meta-Arguments in Terraform ???

    Day 69 - Meta-Arguments in Terraform ???

    When you define a resource block in Terraform, by default, this specifies one resource that will be created. To manage…

    4 条评论
  • Day 65 - Terraform Resources ????

    Day 65 - Terraform Resources ????

    Understanding Terraform Resources A resource in Terraform represents a component of your infrastructure, such as a…

    2 条评论

社区洞察

其他会员也浏览了