Skip to content

Commit 0d95a3f

Browse files
authored
Update azure-disk-customer-managed-keys.md
this PR also unnecessary `account list` instructions which is for getting subsid
1 parent e4358ac commit 0d95a3f

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

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

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Use a customer-managed key to encrypt Azure disks in Azure Kubernetes Ser
33
description: Bring your own keys (BYOK) to encrypt AKS OS and Data disks.
44
ms.topic: article
55
ms.custom: devx-track-azurecli
6-
ms.date: 07/18/2022
6+
ms.date: 05/10/2023
77
---
88

99
# Bring your own keys (BYOK) with Azure disks in Azure Kubernetes Service (AKS)
@@ -93,39 +93,13 @@ az aks create -n myAKSCluster -g myResourceGroup --node-osdisk-diskencryptionset
9393

9494
When new node pools are added to the cluster created above, the customer-managed key provided during the create process is used to encrypt the OS disk.
9595

96-
## Encrypt your AKS cluster data disk(optional)
96+
## Encrypt your AKS cluster data disk
9797

98-
OS disk encryption key is used to encrypt the data disk if the key isn't provided for data disk from AKS version 1.17.2. You can also encrypt AKS data disks with your other keys.
98+
If you have already provided a disk encryption set during cluster creation, encrypting data disks with the same disk encryption set is the default option. Therefore, this step is optional. However, if you want to encrypt data disks with a different disk encryption set, you can follow these steps.
9999

100100
> [!IMPORTANT]
101101
> Ensure you have the proper AKS credentials. The managed identity needs to have contributor access to the resource group where the diskencryptionset is deployed. Otherwise, you'll get an error suggesting that the managed identity does not have permissions.
102102
103-
```azurecli-interactive
104-
# Retrieve your Azure Subscription Id from id property as shown below
105-
az account list
106-
```
107-
108-
The following example resembles output from the command:
109-
110-
```output
111-
someuser@Azure:~$ az account list
112-
[
113-
{
114-
"cloudName": "AzureCloud",
115-
"id": "666e66d8-1e43-4136-be25-f25bb5de5893",
116-
"isDefault": true,
117-
"name": "MyAzureSubscription",
118-
"state": "Enabled",
119-
"tenantId": "3ebbdf90-2069-4529-a1ab-7bdcb24df7cd",
120-
"user": {
121-
"cloudShellID": true,
122-
"name": "[email protected]",
123-
"type": "user"
124-
}
125-
}
126-
]
127-
```
128-
129103
Create a file called **byok-azure-disk.yaml** that contains the following information. Replace *myAzureSubscriptionId*, *myResourceGroup*, and *myDiskEncrptionSetName* with your values, and apply the yaml. Make sure to use the resource group where your DiskEncryptionSet is deployed.
130104

131105
```yaml

0 commit comments

Comments
 (0)