|
1 | 1 | ## Enable the cluster autoscaler on an AKS cluster
|
2 | 2 |
|
3 | 3 | 1. Open the [Azure Cloud Shell](https://shell.azure.com) in your browser and select **Bash**.
|
4 |
| -2. Create an Azure resource group using the `az group create` command. |
| 4 | +1. In the Cloud Shell window on the right side of the screen, select the **More** icon (**...**), then select **Settings** > **Go to Classic version**. |
| 5 | +1. Create an Azure resource group using the `az group create` command. |
5 | 6 |
|
6 | 7 | ```azurecli-interactive
|
7 | 8 | az group create --name myResourceGroup --location eastus
|
8 | 9 | ```
|
9 | 10 |
|
10 |
| -3. Create a new Azure Kubernetes Service (AKS) cluster with the cluster autoscaler enabled using the `az aks create` command and the `--enable-cluster-autoscaler` flag. |
| 11 | +1. Create a new Azure Kubernetes Service (AKS) cluster with the cluster autoscaler enabled using the `az aks create` command and the `--enable-cluster-autoscaler` flag. |
11 | 12 |
|
12 | 13 | ```azurecli-interactive
|
13 | 14 | az aks create --resource-group myResourceGroup --name myAKSCluster --enable-addons monitoring --enable-msi-auth-for-monitoring --enable-cluster-autoscaler --min-count 1 --max-count 10 --generate-ssh-keys
|
14 | 15 | ```
|
15 | 16 |
|
16 | 17 | It takes a few minutes to create the cluster.
|
17 | 18 |
|
18 |
| -4. Connect to your cluster using the `az aks get-credentials` command. |
| 19 | +1. Connect to your cluster using the `az aks get-credentials` command. |
19 | 20 |
|
20 | 21 | ```azurecli-interactive
|
21 | 22 | az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
|
22 | 23 | ```
|
23 | 24 |
|
24 |
| -5. View the nodes in your cluster using the `kubectl get nodes` command. |
| 25 | +1. View the nodes in your cluster using the `kubectl get nodes` command. |
25 | 26 |
|
26 | 27 | ```azurecli-interactive
|
27 | 28 | kubectl get nodes
|
|
44 | 45 | touch deployment.yml
|
45 | 46 | ```
|
46 | 47 |
|
47 |
| -2. Open the manifest file using the `code` command. |
| 48 | +1. Open the manifest file using the `code` command. |
48 | 49 |
|
49 | 50 | ```azurecli-interactive
|
50 | 51 | code deployment.yml
|
51 | 52 | ```
|
52 | 53 |
|
53 |
| -3. Paste the following code into the manifest file. |
| 54 | +1. Paste the following code into the manifest file. |
54 | 55 |
|
55 | 56 | ```yml
|
56 | 57 | apiVersion: apps/v1
|
|
82 | 83 | name: http
|
83 | 84 | ```
|
84 | 85 |
|
85 |
| -4. Save the file and close the editor. |
| 86 | +1. Save the file and close the editor. |
| 87 | +1. Run the deployment by using the following code: |
| 88 | +
|
| 89 | + ```azurecli-interactive |
| 90 | + kubectl apply -f deployment.yml |
| 91 | + ``` |
86 | 92 |
|
87 | 93 | ## Update the cluster autoscaler profile
|
88 | 94 |
|
|
0 commit comments