- Lab
- A Cloud Guru
Configure Azure Kubernetes Service (AKS) Scaling
When you are running applications in Azure Kubernetes Service (AKS), you may need to scale the compute resources to meet the demands of your applications. In this lab, you will learn how to scale your AKS cluster resources to meet demand. For this lab, you should have a basic understanding of Kubernetes.
Path Info
Table of Contents
-
Challenge
Prevent Scheduling of Application Pods on System Node Pools
- Prevent user workloads from being scheduled on the system node pool named agentpool.
-
Challenge
Deploy a Workload
-
Deploy a workload to the AKS cluster using the following manifest file:
-
Review the number of ready pods for the workload myaksapp-deployment.
-
-
Challenge
Create a User Node Pool That Uses the Cluster Autoscaler
- Create a new user node pool that users the cluster autoscaler with the following properties:
- Name: userpool
- Minimum Node Count: 0
- Maxiumum Node Count: 3
- Maximum Pods: 10
- Node VM Size: Standard_D2s_v3
- Operating System: Ubuntu
- Create a new user node pool that users the cluster autoscaler with the following properties:
-
Challenge
Manually Scale a Workload
-
Manually scale your workload up to 12 replicas.
Tip: You can manually scale the workload to 12 replicas using the following command:
kubectl scale deployment/myaksapp-deployment --replicas=12
-
Manually scale your workload back down to 1 replica.
-
-
Challenge
Configure a Horizontal Pod Autoscaler
-
Configure the Horizontal Pod Autoscaler using the provided manifest file: updated-mainfest.yaml
-
Test the Horizontal Pod Autoscaler by loading up the CPU on a pod in the deployment using the stress tool, for example by running the following command on your pod:
apt-get update && apt-get install -y stress; stress --cpu 1
-
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.