How does the Key Vault Secrets Store CSI driver work on AKS?
AdvancedConceptAKS and ACR
Answer
The driver mounts Key Vault secrets, keys and certificates as files into pods through a SecretProviderClass. An identity (workload identity is preferred) authenticates to Key Vault.
apiVersion: secrets-store.csi.x-k8s.io/v1
kind: SecretProviderClass
metadata:
name: kv-shop
spec:
provider: azure
parameters:
clientID: "<uami-client-id>"
keyvaultName: kv-shop-prod
tenantId: "<tenant-id>"
objects: |
array:
- |
objectName: db-password
objectType: secret
Secrets are fetched when the pod starts (the volume mount fails if the fetch fails). Enable rotation (--enable-secret-rotation, default poll 2 minutes) to refresh files. Use secretObjects to also sync into a Kubernetes Secret if you need env vars, which then also needs rotation-aware restarts.
More on AKS and ACR
What does Microsoft manage in AKS and what do you manage?BeginnerWhat is the difference between system and user node pools?BeginnerCompare the AKS networking options: kubenet, Azure CNI, Azure CNI Overlay, Azure CNI Powered by Cilium.AdvancedHow many IPs does an AKS subnet need with flat Azure CNI vs Overlay?AdvancedWhat are the AKS tiers (Free, Standard, Premium)?IntermediateHow do AKS Kubernetes version upgrades work?Intermediate