From the course: Docker for Developers: Create and Manage Docker Containers
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Scaling in Kubernetes - Docker Tutorial
From the course: Docker for Developers: Create and Manage Docker Containers
Scaling in Kubernetes
- [Instructor] One of Kubernetes' best features is how it scales. Scaling in Kubernetes is the process of adjusting how many copies or replicas of your application are running. It helps your app stay fast and available, even under heavy load. Let's take a look at how this works. Over in VS Code, in a terminal, type kubectl scale deployment, then the name of the deployment, which is app. Then, add the replicas flag and set it to 3, followed by the n flag and our namespace, myapp. You should see a confirmation that the app deployment has been scaled. To verify this, we can get a list of our pods. Type kubectl get pods, then the n flag and the myapp namespace. Here, there are three pods running the app service. Another way to scale is in the deployment file directly. Open the app-deployment.yaml file in the k8s folder. You should see a section called spec, and underneath that is replicas. Let's set this to 5. Now we…
Contents
-
-
-
-
-
-
-
-
-
(Locked)
What is Kubernetes?2m 4s
-
(Locked)
Installing kubectl and minikube3m
-
(Locked)
Translating Docker Compose to Kubernetes using Kompose4m 29s
-
Deploying a sample application3m 54s
-
(Locked)
Scaling in Kubernetes2m
-
(Locked)
Challenge: Working with Kubernetes1m 26s
-
(Locked)
Solution: Working with Kubernetes2m 57s
-
(Locked)
Removing Kubernetes resources and stopping minikube2m 34s
-
(Locked)
-
-