Skip to content

Commit 4283d08

Browse files
Merge pull request #172829 from zr-msft/zr-aks-rp-tags
[AKS] added Azure tags for AKS
2 parents fc9c137 + 1831922 commit 4283d08

12 files changed

+249
-47
lines changed

articles/aks/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@
217217
maintainContext: true
218218
- name: Azure portal Kubernetes resource view
219219
href: kubernetes-portal.md
220+
- name: Use tags
221+
href: use-tags.md
220222
- name: Security and authentication
221223
items:
222224
- name: Overview of Defender for Containers

articles/aks/azure-disk-csi.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ $ kubectl exec -it busybox-azuredisk-0 -- cat c:\mnt\azuredisk\data.txt # on Win
393393
(...)
394394
```
395395

396+
## Using Azure tags
397+
398+
For more details on using Azure tags, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].
399+
396400
## Next steps
397401

398402
- To learn how to use CSI drivers for Azure Files, see [Use Azure Files with CSI drivers](azure-files-csi.md).
@@ -425,3 +429,4 @@ $ kubectl exec -it busybox-azuredisk-0 -- cat c:\mnt\azuredisk\data.txt # on Win
425429
[az-feature-register]: /cli/azure/feature#az_feature_register
426430
[az-feature-list]: /cli/azure/feature#az_feature_list
427431
[az-provider-register]: /cli/azure/provider#az_provider_register
432+
[use-tags]: use-tags.md

articles/aks/azure-disk-customer-managed-keys.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ az aks get-credentials --name myAksCluster --resource-group myResourceGroup --ou
137137
kubectl apply -f byok-azure-disk.yaml
138138
```
139139

140+
## Using Azure tags
141+
142+
For more details on using Azure tags, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].
143+
140144
## Next steps
141145

142146
Review [best practices for AKS cluster security][best-practices-security]
@@ -152,3 +156,4 @@ Review [best practices for AKS cluster security][best-practices-security]
152156
[customer-managed-keys-linux]: ../virtual-machines/disk-encryption.md#customer-managed-keys
153157
[key-vault-generate]: ../key-vault/general/manage-with-cli2.md
154158
[supported-regions]: ../virtual-machines/disk-encryption.md#supported-regions
159+
[use-tags]: use-tags.md

articles/aks/azure-disk-volume.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ Events:
119119
[...]
120120
```
121121

122+
## Using Azure tags
123+
124+
For more details on using Azure tags, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].
125+
122126
## Next steps
123127

124128
For associated best practices, see [Best practices for storage and backups in AKS][operator-best-practices-storage].
@@ -142,3 +146,4 @@ For more information about AKS clusters interact with Azure disks, see the [Kube
142146
[azure-files-volume]: azure-files-volume.md
143147
[operator-best-practices-storage]: operator-best-practices-storage.md
144148
[concepts-storage]: concepts-storage.md
149+
[use-tags]: use-tags.md

articles/aks/azure-disks-dynamic-pv.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ Volumes:
254254
[...]
255255
```
256256

257+
## Using Azure tags
258+
259+
For more details on using Azure tags, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].
260+
257261
## Next steps
258262

259263
For associated best practices, see [Best practices for storage and backups in AKS][operator-best-practices-storage].
@@ -293,3 +297,4 @@ Learn more about Kubernetes persistent volumes using Azure disks.
293297
[az-feature-register]: /cli/azure/feature#az_feature_register
294298
[az-feature-list]: /cli/azure/feature#az_feature_list
295299
[az-provider-register]: /cli/azure/provider#az_provider_register
300+
[use-tags]: use-tags.md

articles/aks/azure-files-csi.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,10 @@ $ kubectl exec -it busybox-azurefile-0 -- cat c:\mnt\azurefile\data.txt # on Win
337337
(...)
338338
```
339339

340+
## Using Azure tags
341+
342+
For more details on using Azure tags, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].
343+
340344
## Next steps
341345

342346
- To learn how to use CSI drivers for Azure disks, see [Use Azure disks with CSI drivers](azure-disk-csi.md).
@@ -372,3 +376,4 @@ $ kubectl exec -it busybox-azurefile-0 -- cat c:\mnt\azurefile\data.txt # on Win
372376
[az-provider-register]: /cli/azure/provider#az_provider_register
373377
[node-resource-group]: faq.md#why-are-two-resource-groups-created-with-aks
374378
[storage-skus]: ../storage/common/storage-redundancy.md
379+
[use-tags]: use-tags.md

articles/aks/azure-files-dynamic-pv.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ parameters:
184184
skuName: Standard_LRS
185185
```
186186
187+
## Using Azure tags
188+
189+
For more details on using Azure tags, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].
190+
187191
## Next steps
188192
189193
For associated best practices, see [Best practices for storage and backups in AKS][operator-best-practices-storage].
@@ -226,3 +230,4 @@ Learn more about Kubernetes persistent volumes using Azure Files.
226230
[operator-best-practices-storage]: operator-best-practices-storage.md
227231
[concepts-storage]: concepts-storage.md
228232
[node-resource-group]: faq.md#why-are-two-resource-groups-created-with-aks
233+
[use-tags]: use-tags.md

articles/aks/azure-files-volume.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ kubectl delete pod mypod
194194
kubectl apply -f azure-files-pod.yaml
195195
```
196196

197+
## Using Azure tags
198+
199+
For more details on using Azure tags, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].
200+
197201
## Next steps
198202

199203
For Azure File CSI driver parameters, see [CSI driver parameters][CSI driver parameters].
@@ -218,3 +222,4 @@ For associated best practices, see [Best practices for storage and backups in AK
218222
[operator-best-practices-storage]: operator-best-practices-storage.md
219223
[concepts-storage]: concepts-storage.md
220224
[persistent-volume-example]: #mount-file-share-as-a-persistent-volume
225+
[use-tags]: use-tags.md

articles/aks/azure-netapp-files.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,10 @@ Astra Trident supports many features with Azure NetApp Files, such as:
512512
* [On-demand volume snapshots](https://docs.netapp.com/us-en/trident/trident-use/vol-snapshots.html)
513513
* [Importing volumes](https://docs.netapp.com/us-en/trident/trident-use/vol-import.html)
514514

515+
## Using Azure tags
516+
517+
For more details on using Azure tags, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].
518+
515519
## Next steps
516520

517521
* For more information on Azure NetApp Files, see [What is Azure NetApp Files][anf].
@@ -535,3 +539,4 @@ Astra Trident supports many features with Azure NetApp Files, such as:
535539
[kubectl-apply]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply
536540
[kubectl-describe]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#describe
537541
[kubectl-exec]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#exec
542+
[use-tags]: use-tags.md

articles/aks/use-multiple-node-pools.md

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -557,53 +557,7 @@ $ az aks nodepool list -g myResourceGroup --cluster-name myAKSCluster
557557

558558
### Setting nodepool Azure tags
559559

560-
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.
561-
562-
Azure tags have keys which are case-insensitive for operations, such as when retrieving a tag by searching the key. In this case a tag with the given key will be updated or retrieved regardless of casing. Tag values are case-sensitive.
563-
564-
In AKS, if multiple tags are set with identical keys but different casing, the tag used is the first in alphabetical order. For example, `{"Key1": "val1", "kEy1": "val2", "key1": "val3"}` results in `Key1` and `val1` being set.
565-
566-
Create a node pool using the [az aks nodepool add][az-aks-nodepool-add]. Specify the name *tagnodepool* and use the `--tag` parameter to specify *dept=IT* and *costcenter=9999* for tags.
567-
568-
```azurecli-interactive
569-
az aks nodepool add \
570-
--resource-group myResourceGroup \
571-
--cluster-name myAKSCluster \
572-
--name tagnodepool \
573-
--node-count 1 \
574-
--tags dept=IT costcenter=9999 \
575-
--no-wait
576-
```
577-
578-
> [!NOTE]
579-
> 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.
580-
581-
The following example output from the [az aks nodepool list][az-aks-nodepool-list] command shows that *tagnodepool* is *Creating* nodes with the specified *tag*:
582-
583-
```azurecli
584-
az aks nodepool list -g myResourceGroup --cluster-name myAKSCluster
585-
```
586-
587-
```output
588-
[
589-
{
590-
...
591-
"count": 1,
592-
...
593-
"name": "tagnodepool",
594-
"orchestratorVersion": "1.15.7",
595-
...
596-
"provisioningState": "Creating",
597-
...
598-
"tags": {
599-
"dept": "IT",
600-
"costcenter": "9999"
601-
},
602-
...
603-
},
604-
...
605-
]
606-
```
560+
For more details on using Azure tags with node pools, see [Use Azure tags in Azure Kubernetes Service (AKS)][use-tags].
607561

608562
## Add a FIPS-enabled node pool
609563

@@ -928,3 +882,4 @@ Use [proximity placement groups][reduce-latency-ppg] to reduce latency for your
928882
[az-public-ip-prefix-create]: /cli/azure/network/public-ip/prefix#az_network_public_ip_prefix_create
929883
[node-image-upgrade]: node-image-upgrade.md
930884
[fips]: /azure/compliance/offerings/offering-fips-140-2
885+
[use-tags]: use-tags.md

0 commit comments

Comments
 (0)