forked from Azure/acs-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add keyvault-flexvolume addon (Azure#3498)
- Loading branch information
Showing
18 changed files
with
340 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Azure Key Vault FlexVolume Add-on | ||
|
||
[The Azure Key Vault FlexVolume](https://github.com/Azure/kubernetes-keyvault-flexvol) integrates Azure Key Vault with Kubernetes via a FlexVolume. | ||
|
||
With the Azure Key Vault FlexVolume, developers can access application-specific secrets, keys, and certs stored in Azure Key Vault directly from their pods. | ||
|
||
Add this add-on to your apimodel as shown below to automatically enable Key Vault FlexVolume in your new Kubernetes cluster. | ||
|
||
```json | ||
{ | ||
"apiVersion": "vlabs", | ||
"properties": { | ||
"orchestratorProfile": { | ||
"orchestratorType": "Kubernetes", | ||
"kubernetesConfig": { | ||
"addons": [ | ||
{ | ||
"name": "keyvault-flexvolume", | ||
"enabled" : true | ||
} | ||
] | ||
} | ||
}, | ||
"masterProfile": { | ||
"count": 1, | ||
"dnsPrefix": "", | ||
"vmSize": "Standard_DS2_v2", | ||
}, | ||
"agentPoolProfiles": [ | ||
{ | ||
"name": "agentpool", | ||
"count": 3, | ||
"vmSize": "Standard_DS2_v2", | ||
"availabilityProfile": "VirtualMachineScaleSets" | ||
} | ||
], | ||
"linuxProfile": { | ||
"adminUsername": "azureuser", | ||
"ssh": { | ||
"publicKeys": [ | ||
{ | ||
"keyData": "" | ||
} | ||
] | ||
} | ||
}, | ||
"servicePrincipalProfile": { | ||
"clientId": "", | ||
"secret": "" | ||
} | ||
} | ||
} | ||
|
||
``` | ||
|
||
To validate the add-on is running as expected, run the following commands: | ||
|
||
You should see the keyvault flexvolume installer pods running on each agent node: | ||
|
||
```bash | ||
kubectl get pods -n kv | ||
|
||
keyvault-flexvolume-f7bx8 1/1 Running 0 3m | ||
keyvault-flexvolume-rcxbl 1/1 Running 0 3m | ||
keyvault-flexvolume-z6jm6 1/1 Running 0 3m | ||
``` | ||
|
||
Follow the README at https://github.com/Azure/kubernetes-keyvault-flexvol for get started steps. | ||
|
||
## | ||
To update resources: | ||
|
||
```json | ||
"kubernetesConfig": { | ||
"addons": [ | ||
{ | ||
"name": "keyvault-flexvolume", | ||
"enabled": true, | ||
"containers": [ | ||
{ | ||
"name": "keyvault-flexvolume", | ||
"image": "ritazh/kv-flexvol-installer:v0.0.3", | ||
"cpuRequests": "100m", | ||
"memoryRequests": "300Mi", | ||
"cpuLimits": "100m", | ||
"memoryLimits": "300Mi" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
## Supported Orchestrators | ||
|
||
Kubernetes |
43 changes: 43 additions & 0 deletions
43
examples/addons/keyvault-flexvolume/kubernetes-keyvault-flexvolume.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"apiVersion": "vlabs", | ||
"properties": { | ||
"orchestratorProfile": { | ||
"orchestratorType": "Kubernetes", | ||
"kubernetesConfig": { | ||
"addons": [ | ||
{ | ||
"name": "keyvault-flexvolume", | ||
"enabled": true | ||
} | ||
] | ||
} | ||
}, | ||
"masterProfile": { | ||
"count": 1, | ||
"dnsPrefix": "", | ||
"vmSize": "Standard_DS2_v2" | ||
}, | ||
"agentPoolProfiles": [ | ||
{ | ||
"name": "agentpool", | ||
"count": 3, | ||
"vmSize": "Standard_DS2_v2", | ||
"availabilityProfile": "VirtualMachineScaleSets" | ||
} | ||
], | ||
"linuxProfile": { | ||
"adminUsername": "azureuser", | ||
"ssh": { | ||
"publicKeys": [ | ||
{ | ||
"keyData": "" | ||
} | ||
] | ||
} | ||
}, | ||
"servicePrincipalProfile": { | ||
"clientId": "", | ||
"secret": "" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
parts/k8s/addons/kubernetesmasteraddons-keyvault-flexvolume-installer.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
labels: | ||
kubernetes.io/cluster-service: "true" | ||
addonmanager.kubernetes.io/mode: "EnsureExists" | ||
name: kv | ||
--- | ||
apiVersion: extensions/v1beta1 | ||
kind: DaemonSet | ||
metadata: | ||
labels: | ||
app: keyvault-flexvolume | ||
kubernetes.io/cluster-service: "true" | ||
addonmanager.kubernetes.io/mode: "EnsureExists" | ||
name: keyvault-flexvolume | ||
namespace: kv | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: keyvault-flexvolume | ||
kubernetes.io/cluster-service: "true" | ||
addonmanager.kubernetes.io/mode: "EnsureExists" | ||
spec: | ||
tolerations: | ||
containers: | ||
- name: keyvault-flexvolume | ||
image: "ritazh/kv-flexvol-installer:v0.0.3" | ||
imagePullPolicy: Always | ||
resources: | ||
requests: | ||
cpu: <kubernetesKeyVaultFlexVolumeInstallerCPURequests> | ||
memory: <kubernetesKeyVaultFlexVolumeInstallerMemoryRequests> | ||
limits: | ||
cpu: <kubernetesKeyVaultFlexVolumeInstallerCPULimit> | ||
memory: <kubernetesKeyVaultFlexVolumeInstallerMemoryLimit> | ||
env: | ||
- name: TARGET_DIR | ||
value: "/etc/kubernetes/volumeplugins" | ||
volumeMounts: | ||
- mountPath: "/etc/kubernetes/volumeplugins" | ||
name: volplugins | ||
volumes: | ||
- hostPath: | ||
path: "/etc/kubernetes/volumeplugins" | ||
name: volplugins | ||
nodeSelector: | ||
beta.kubernetes.io/os: linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.