Azure File plugin on kubernetes: using Storage Service Encryption(SSE) with customer-managed keys(CMK)
SSE+CMK is now available for Azure Files, this page shows how to use this feature on azure file plugin
Storage Service Encryption using customer-managed keys in Azure Key Vault
Note: In AKS, the specified storage account should be under a
shadow resource group
(naming asMC_+{RESOUCE-GROUP-NAME}+{CLUSTER-NAME}+{REGION}
) which contains all resources of your aks cluster.
1. Create an azure file storage class which would provision azure file PVC under the above storage account with SSE+CMK enabled
wget https://raw.githubusercontent.com/andyzhangx/demo/master/pv/storageclass-azurefile-cmk.yaml
# edit storageAccount and skuName fields
vi storageclass-azurefile-sse-cmk.yaml
kubectl create -f https://raw.githubusercontent.com/andyzhangx/Demo/master/pv/pvc-azurefile-cmk.yaml
make sure pvc is created successfully
watch kubectl describe pvc pvc-azurefile
kubectl create -f https://raw.githubusercontent.com/andyzhangx/Demo/master/linux/azurefile/nginx-pod-azurefile.yaml
watch the status of pod until its Status changed from
Pending
toRunning
watch kubectl describe po nginx-azurefile
kubectl exec -it nginx-azurefile -- bash
refer to Manually create and use a volume with Azure Files share in Azure Kubernetes Service (AKS)