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/azure-disk-customer-managed-keys.md
+21-10Lines changed: 21 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,21 +3,27 @@ title: Use a customer-managed key to encrypt Azure disks in Azure Kubernetes Ser
3
3
description: Bring your own keys (BYOK) to encrypt AKS OS and Data disks.
4
4
services: container-service
5
5
ms.topic: article
6
-
ms.date: 1/9/2022
6
+
ms.date: 07/18/2022
7
7
8
8
---
9
9
10
10
# Bring your own keys (BYOK) with Azure disks in Azure Kubernetes Service (AKS)
11
11
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].
13
15
14
16
## Limitations
17
+
15
18
* Data disk encryption support is limited to AKS clusters running Kubernetes version 1.17 and above.
16
19
* Encryption of OS disk with customer-managed keys can only be enabled when creating an AKS cluster.
17
20
18
21
## Prerequisites
22
+
19
23
* You must enable soft delete and purge protection for *Azure Key Vault* when using Key Vault to encrypt managed disks.
20
24
* 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.
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
+
45
51
```azurecli-interactive
46
52
# Retrieve the Key Vault Id and store it in a variable
47
53
$keyVaultId=az keyvault show --name myKeyVaultName --query "[id]" -o tsv
## Create a new AKS cluster and encrypt the OS disk
72
78
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.
74
80
75
81
> [!IMPORTANT]
76
82
> Ensure you create a new resoruce group for your AKS cluster
@@ -86,20 +92,23 @@ az group create -n myResourceGroup -l myAzureRegionName
86
92
az aks create -n myAKSCluster -g myResourceGroup --node-osdisk-diskencryptionset-id $diskEncryptionSetId --kubernetes-version KUBERNETES_VERSION --generate-ssh-keys
87
93
```
88
94
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.
90
96
91
97
## 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.
93
100
94
101
> [!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.
96
103
97
104
```azurecli-interactive
98
105
# Retrieve your Azure Subscription Id from id property as shown below
99
106
az account list
100
107
```
101
108
102
-
```
109
+
The following example resembles output from the command:
0 commit comments