Skip to content

Commit 50edad5

Browse files
committed
updated CMK article about key rotation
1 parent 750df22 commit 50edad5

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

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

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,27 @@ 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
services: container-service
55
ms.topic: article
6-
ms.date: 1/9/2022
6+
ms.date: 07/18/2022
77

88
---
99

1010
# Bring your own keys (BYOK) with Azure disks in Azure Kubernetes Service (AKS)
1111

12-
Azure Storage encrypts all data in a storage account at rest. By default, data is encrypted with Microsoft-managed keys. For additional control over encryption keys, you can supply customer-managed keys to use for encryption at rest for both the OS and data disks for your AKS clusters. Learn more about customer-managed keys on [Linux][customer-managed-keys-linux] and [Windows][customer-managed-keys-windows].
12+
Azure Storage encrypts all data in a storage account at rest. By default, data is encrypted with Microsoft-managed keys. For additional control over encryption keys, you can supply customer-managed keys to use for encryption at rest for both the OS and data disks for your AKS clusters.
13+
14+
Learn more about customer-managed keys on [Linux][customer-managed-keys-linux] and [Windows][customer-managed-keys-windows].
1315

1416
## Limitations
17+
1518
* Data disk encryption support is limited to AKS clusters running Kubernetes version 1.17 and above.
1619
* Encryption of OS disk with customer-managed keys can only be enabled when creating an AKS cluster.
1720

1821
## Prerequisites
22+
1923
* You must enable soft delete and purge protection for *Azure Key Vault* when using Key Vault to encrypt managed disks.
2024
* You need the Azure CLI version 2.11.1 or later.
25+
* Customer-managed keys are only supported in Kubernetes versions 1.17 and higher.
26+
* If you choose to rotate (change) your keys periodically, see [Customer-managed keys and encryption of Azure managed disk](../virtual-machines/disk-encryption.md) for more information.
2127

2228
## Create an Azure Key Vault instance
2329

@@ -41,7 +47,7 @@ az keyvault create -n myKeyVaultName -g myResourceGroup -l myAzureRegionName --
4147
## Create an instance of a DiskEncryptionSet
4248

4349
Replace *myKeyVaultName* with the name of your key vault. You will also need a *key* stored in Azure Key Vault to complete the following steps. Either store your existing Key in the Key Vault you created on the previous steps, or [generate a new key][key-vault-generate] and replace *myKeyName* below with the name of your key.
44-
50+
4551
```azurecli-interactive
4652
# Retrieve the Key Vault Id and store it in a variable
4753
$keyVaultId=az keyvault show --name myKeyVaultName --query "[id]" -o tsv
@@ -54,7 +60,7 @@ az disk-encryption-set create -n myDiskEncryptionSetName -l myAzureRegionName
5460
```
5561

5662
> [!IMPORTANT]
57-
> Ensure your AKS cluster identity has read permission of DiskEncryptionSet
63+
> Ensure your AKS cluster identity has **read** permission of DiskEncryptionSet
5864
5965
## Grant the DiskEncryptionSet access to key vault
6066

@@ -70,7 +76,7 @@ az keyvault set-policy -n myKeyVaultName -g myResourceGroup --object-id $desIden
7076

7177
## Create a new AKS cluster and encrypt the OS disk
7278

73-
Create a **new resource group** and AKS cluster, then use your key to encrypt the OS disk. Customer-managed keys are only supported in Kubernetes versions greater than 1.17.
79+
Create a **new resource group** and AKS cluster, then use your key to encrypt the OS disk.
7480

7581
> [!IMPORTANT]
7682
> Ensure you create a new resoruce group for your AKS cluster
@@ -86,20 +92,23 @@ az group create -n myResourceGroup -l myAzureRegionName
8692
az aks create -n myAKSCluster -g myResourceGroup --node-osdisk-diskencryptionset-id $diskEncryptionSetId --kubernetes-version KUBERNETES_VERSION --generate-ssh-keys
8793
```
8894

89-
When new node pools are added to the cluster created above, the customer-managed key provided during the create is used to encrypt the OS disk.
95+
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.
9096

9197
## Encrypt your AKS cluster data disk(optional)
92-
OS disk encryption key will be used to encrypt data disk if key is not provided for data disk from v1.17.2, and you can also encrypt AKS data disks with your other keys.
98+
99+
OS disk encryption key is used to encrypt the data disk if the key is not provided for data disk from AKS version 1.17.2. You can also encrypt AKS data disks with your other keys.
93100

94101
> [!IMPORTANT]
95-
> Ensure you have the proper AKS credentials. The managed identity will need to have contributor access to the resource group where the diskencryptionset is deployed. Otherwise, you will get an error suggesting that the managed identity does not have permissions.
102+
> 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.
96103
97104
```azurecli-interactive
98105
# Retrieve your Azure Subscription Id from id property as shown below
99106
az account list
100107
```
101108

102-
```
109+
The following example resembles output from the command:
110+
111+
```output
103112
someuser@Azure:~$ az account list
104113
[
105114
{
@@ -131,7 +140,9 @@ parameters:
131140
kind: managed
132141
diskEncryptionSetID: "/subscriptions/{myAzureSubscriptionId}/resourceGroups/{myResourceGroup}/providers/Microsoft.Compute/diskEncryptionSets/{myDiskEncryptionSetName}"
133142
```
134-
Next, run this deployment in your AKS cluster:
143+
144+
Next, run the following commands to update your AKS cluster:
145+
135146
```azurecli-interactive
136147
# Get credentials
137148
az aks get-credentials --name myAksCluster --resource-group myResourceGroup --output table

0 commit comments

Comments
 (0)