@@ -72,7 +72,7 @@ keyVaultId=$(az keyvault show --name myKeyVaultName --query [id] -o tsv)
72
72
keyVaultKeyUrl=$(az keyvault key show --vault-name myKeyVaultName --name myKeyName --query [key.kid] -o tsv)
73
73
74
74
# Create a DiskEncryptionSet
75
- az disk-encryption-set create -n myDiskEncryptionSetName -l myAzureRegionName -g myResourceGroup--source-vault $keyVaultId --key-url $keyVaultKeyUrl
75
+ az disk-encryption-set create -n myDiskEncryptionSetName -l myAzureRegionName -g myResourceGroup --source-vault $keyVaultId --key-url $keyVaultKeyUrl
76
76
```
77
77
78
78
## Grant the DiskEncryptionSet resource access to the key vault
@@ -81,10 +81,10 @@ Use the DiskEncryptionSet and resource groups you created on the prior steps, an
81
81
82
82
``` azurecli-interactive
83
83
# Retrieve the DiskEncryptionSet value and set a variable
84
- desIdentity=$(az disk-encryption-set show -n myDiskEncryptionSetName -g myResourceGroup--query [identity.principalId] -o tsv)
84
+ desIdentity=$(az disk-encryption-set show -n myDiskEncryptionSetName -g myResourceGroup --query [identity.principalId] -o tsv)
85
85
86
86
# Update security policy settings
87
- az keyvault set-policy -n myKeyVaultName -g myResourceGroup--object-id $desIdentity --key-permissions wrapkey unwrapkey get
87
+ az keyvault set-policy -n myKeyVaultName -g myResourceGroup --object-id $desIdentity --key-permissions wrapkey unwrapkey get
88
88
89
89
# Assign the reader role
90
90
az role assignment create --assignee $desIdentity --role Reader --scope $keyVaultId
@@ -96,13 +96,13 @@ Create a new resource group and AKS cluster, then use your key to encrypt the OS
96
96
97
97
``` azurecli-interactive
98
98
# Retrieve the DiskEncryptionSet value and set a variable
99
- diskEncryptionSetId=$(az resource show -n $ diskEncryptionSetName -g ssecmktesting --resource-type "Microsoft.Compute/diskEncryptionSets" --query [id] -o tsv)
99
+ diskEncryptionSetId=$(az resource show -n diskEncryptionSetName -g myResourceGroup --resource-type "Microsoft.Compute/diskEncryptionSets" --query [id] -o tsv)
100
100
101
101
# Create a resource group for the AKS cluster
102
102
az group create -n myResourceGroup-l myAzureRegionName
103
103
104
104
# Create the AKS cluster
105
- az aks create -n myAKSCluster -g myResourceGroup --node-osdisk-diskencryptionset-id diskEncryptionId --kubernetes-version 1.17.0
105
+ az aks create -n myAKSCluster -g myResourceGroup --node-osdisk-diskencryptionset-id $diskEncryptionSetId --kubernetes-version 1.17.0
106
106
```
107
107
108
108
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
0 commit comments