|
| 1 | +# Azure Key Vault FlexVolume Add-on |
| 2 | + |
| 3 | +[The Azure Key Vault FlexVolume](https://github.com/Azure/kubernetes-keyvault-flexvol) integrates Azure Key Vault with Kubernetes via a FlexVolume. |
| 4 | + |
| 5 | +With the Azure Key Vault FlexVolume, developers can access application-specific secrets, keys, and certs stored in Azure Key Vault directly from their pods. |
| 6 | + |
| 7 | +Add this add-on to your apimodel as shown below to automatically enable Key Vault FlexVolume in your new Kubernetes cluster. |
| 8 | + |
| 9 | +```json |
| 10 | +{ |
| 11 | + "apiVersion": "vlabs", |
| 12 | + "properties": { |
| 13 | + "orchestratorProfile": { |
| 14 | + "orchestratorType": "Kubernetes", |
| 15 | + "kubernetesConfig": { |
| 16 | + "addons": [ |
| 17 | + { |
| 18 | + "name": "keyvault-flexvolume", |
| 19 | + "enabled" : true |
| 20 | + } |
| 21 | + ] |
| 22 | + } |
| 23 | + }, |
| 24 | + "masterProfile": { |
| 25 | + "count": 1, |
| 26 | + "dnsPrefix": "", |
| 27 | + "vmSize": "Standard_DS2_v2", |
| 28 | + }, |
| 29 | + "agentPoolProfiles": [ |
| 30 | + { |
| 31 | + "name": "agentpool", |
| 32 | + "count": 3, |
| 33 | + "vmSize": "Standard_DS2_v2", |
| 34 | + "availabilityProfile": "VirtualMachineScaleSets" |
| 35 | + } |
| 36 | + ], |
| 37 | + "linuxProfile": { |
| 38 | + "adminUsername": "azureuser", |
| 39 | + "ssh": { |
| 40 | + "publicKeys": [ |
| 41 | + { |
| 42 | + "keyData": "" |
| 43 | + } |
| 44 | + ] |
| 45 | + } |
| 46 | + }, |
| 47 | + "servicePrincipalProfile": { |
| 48 | + "clientId": "", |
| 49 | + "secret": "" |
| 50 | + } |
| 51 | + } |
| 52 | + } |
| 53 | + |
| 54 | +``` |
| 55 | + |
| 56 | +To validate the add-on is running as expected, run the following commands: |
| 57 | + |
| 58 | +You should see the keyvault flexvolume installer pods running on each agent node: |
| 59 | + |
| 60 | +```bash |
| 61 | +kubectl get pods -n kv |
| 62 | + |
| 63 | +keyvault-flexvolume-f7bx8 1/1 Running 0 3m |
| 64 | +keyvault-flexvolume-rcxbl 1/1 Running 0 3m |
| 65 | +keyvault-flexvolume-z6jm6 1/1 Running 0 3m |
| 66 | +``` |
| 67 | + |
| 68 | +Follow the README at https://github.com/Azure/kubernetes-keyvault-flexvol for get started steps. |
| 69 | + |
| 70 | +## |
| 71 | +To update resources: |
| 72 | + |
| 73 | +```json |
| 74 | +"kubernetesConfig": { |
| 75 | + "addons": [ |
| 76 | + { |
| 77 | + "name": "keyvault-flexvolume", |
| 78 | + "enabled": true, |
| 79 | + "containers": [ |
| 80 | + { |
| 81 | + "name": "keyvault-flexvolume", |
| 82 | + "image": "ritazh/kv-flexvol-installer:v0.0.3", |
| 83 | + "cpuRequests": "100m", |
| 84 | + "memoryRequests": "300Mi", |
| 85 | + "cpuLimits": "100m", |
| 86 | + "memoryLimits": "300Mi" |
| 87 | + } |
| 88 | + ] |
| 89 | + } |
| 90 | + ] |
| 91 | + } |
| 92 | +``` |
| 93 | + |
| 94 | +## Supported Orchestrators |
| 95 | + |
| 96 | +Kubernetes |
0 commit comments