Launching your Kubernetes Cluster with Deployment

Launching your Kubernetes Cluster with Deployment

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

No alt text provided for this image

This deployment file will create a deployment with?2 replicas?of a container named?todo. The container is based on the image?sayalishewale/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        
No alt text provided for this image

To list a deployment:

kubectl get deployments        
No alt text provided for this image

To list a pods:

kubectl get pods        
No alt text provided for this image

Thanks for reading this article:-

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

Kashi Diggi的更多文章

  • Day 44: Relational Database Service in AWS

    Day 44: Relational Database Service in AWS

    Amazon Relational Database Service (Amazon RDS) is a collection of managed services that makes it simple to set up…

  • Day 43: S3 Programmatic access with AWS-CLI

    Day 43: S3 Programmatic access with AWS-CLI

    S3 Amazon Simple Storage Service (Amazon S3) is an object storage service that provides a secure and scalable way to…

  • IAM Programmatic access and AWS CLI

    IAM Programmatic access and AWS CLI

    IAM Programmatic access In order to access your AWS account from a terminal or system, you can use AWS Access keys and…

  • Setting up an Application Load Balancer with AWS EC2

    Setting up an Application Load Balancer with AWS EC2

    What is Load Balancing? Load balancing is the distribution of workloads across multiple servers to ensure consistent…

  • Day 40 AWS EC2 Automation

    Day 40 AWS EC2 Automation

    Automation in EC2: Amazon EC2 or Amazon Elastic Compute Cloud can give you secure, reliable, high-performance, and…

  • Day 39 AWS and IAM Basics

    Day 39 AWS and IAM Basics

    AWS: Amazon Web Services is one of the most popular Cloud Provider that has free tier too for students and Cloud…

  • Day 38 Getting Started with AWS Basics

    Day 38 Getting Started with AWS Basics

    AWS: Amazon Web Services (AWS) is a comprehensive cloud computing platform offered by Amazon that provides a wide range…

  • Day 34 Task: Working with Services in Kubernetes

    Day 34 Task: Working with Services in Kubernetes

    What are Services in K8s In Kubernetes, Services are objects that provide stable network identities to Pods and…

    1 条评论
  • Working with Namespaces and Services in Kubernetes

    Working with Namespaces and Services in Kubernetes

    What are Namespaces and Services in k8s? In Kubernetes, Namespaces are used to create isolated environments for…

  • Task: Launching your First Kubernetes Cluster with Nginx running

    Task: Launching your First Kubernetes Cluster with Nginx running

    What is minikube? Minikube is a tool which quickly sets up a local Kubernetes cluster on macOS, Linux, and Windows. It…

    1 条评论

社区洞察

其他会员也浏览了