You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/use-multiple-node-pools.md
+73-14Lines changed: 73 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: mlearned
6
6
7
7
ms.service: container-service
8
8
ms.topic: article
9
-
ms.date: 01/22/2020
9
+
ms.date: 02/14/2020
10
10
ms.author: mlearned
11
11
---
12
12
@@ -449,6 +449,61 @@ Events:
449
449
450
450
Only pods that have this taint applied can be scheduled on nodes in *gpunodepool*. Any other pod would be scheduled in the *nodepool1* node pool. If you create additional node pools, you can use additional taints and tolerations to limit what pods can be scheduled on those node resources.
451
451
452
+
## Specify a tag for a node pool
453
+
454
+
You can apply an Azure tag to node pools in your AKS cluster. Tags applied to a node pool are applied to each node within the node pool and are persisted through upgrades. Tags are also applied to new nodes added to a node pool during scale out operations. Adding a tag can help with tasks such as policy tracking or cost estimation.
455
+
456
+
> [!IMPORTANT]
457
+
> To use node pool tags, you need the *aks-preview* CLI extension version 0.4.29 or higher. Install the *aks-preview* Azure CLI extension using the [az extension add][az-extension-add] command, then check for any available updates using the [az extension update][az-extension-update] command:
458
+
>
459
+
> ```azurecli-interactive
460
+
> # Install the aks-preview extension
461
+
> az extension add --name aks-preview
462
+
>
463
+
> # Update the extension to make sure you have the latest version installed
464
+
> az extension update --name aks-preview
465
+
> ```
466
+
467
+
Create a node pool using the [az aks node pool add][az-aks-nodepool-add]. Specify the name *tagnodepool* and use the `--tag` parameter to specify *dept=IT* and *costcenter=9999* for tags.
468
+
469
+
```azurecli-interactive
470
+
az aks nodepool add \
471
+
--resource-group myResourceGroup \
472
+
--cluster-name myAKSCluster \
473
+
--name tagnodepool \
474
+
--node-count 1 \
475
+
--tags dept=IT costcenter=9999 \
476
+
--no-wait
477
+
```
478
+
479
+
> [!NOTE]
480
+
> You can also use the `--tags` parameter when using [az aks nodepool update][az-aks-nodepool-update] command as well as during cluster creation. During cluster creation, the `--tags` parameter applies the tag to the initial node pool created with the cluster. All tag names must adhere to the limitations in [Use tags to organize your Azure resources][tag-limitation]. Updating a node pool with the `--tags` parameter updates any existing tag values and appends any new tags. For example, if your node pool had *dept=IT* and *costcenter=9999* for tags and you updated it with *team=dev* and *costcenter=111* for tags, you nodepool would have *dept=IT*, *costcenter=111*, and *team=dev* for tags.
481
+
482
+
The following example output from the [az aks nodepool list][az-aks-nodepool-list] command shows that *taggednodepool* is *Creating* nodes with the specified *tag*:
483
+
484
+
```console
485
+
$ az aks nodepool list -g myResourceGroup --cluster-name myAKSCluster
486
+
487
+
[
488
+
{
489
+
...
490
+
"count": 1,
491
+
...
492
+
"name": "tagnodepool",
493
+
"orchestratorVersion": "1.15.7",
494
+
...
495
+
"provisioningState": "Creating",
496
+
...
497
+
"tags": {
498
+
"dept": "IT",
499
+
"costcenter": "9999"
500
+
},
501
+
...
502
+
},
503
+
...
504
+
]
505
+
```
506
+
452
507
## Manage node pools using a Resource Manager template
453
508
454
509
When you use an Azure Resource Manager template to create and managed resources, you can typically update the settings in your template and redeploy to update the resource. With node pools in AKS, the initial node pool profile can't be updated once the AKS cluster has been created. This behavior means that you can't update an existing Resource Manager template, make a change to the node pools, and redeploy. Instead, you must create a separate Resource Manager template that updates only the node pools for an existing AKS cluster.
@@ -599,21 +654,25 @@ To create and use Windows Server container node pools, see [Create a Windows Ser
0 commit comments