You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/read-from-secret.md
+18-3Lines changed: 18 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,20 @@
1
1
# Read cloud config from Kubernetes secrets
2
2
3
-
-Available driver version: `v0.5.0` or above
3
+
-available driver version: `v0.5.0` or above
4
4
5
5
This driver also supports [reading the cloud config from Kubernetes secrets](https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/docs/cloud-provider-config.md#setting-azure-cloud-provider-from-kubernetes-secrets). The secret is a serialized version of `azure.json` file with key cloud-config. The secret should be put in `kube-system` namespace and its name should be `azure-cloud-provider`.
6
6
7
-
### How to convert cloud config to a Kubernetes secret
8
-
1. create `azure.json` file and fill in all necessary fields, refer to [Cloud provider config](https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/docs/cloud-provider-config.md), and here is an [example](https://github.com/andyzhangx/demo/blob/master/aks-engine/deployment/etc/kubernetes/azure.json)
7
+
### How to convert cloud config to a Kubernetes secret
9
8
9
+
1. create `azure.json` file and fill in all necessary fields, refer to [Cloud provider config](https://github.com/kubernetes-sigs/cloud-provider-azure/blob/master/docs/cloud-provider-config.md), and here is an [example](https://github.com/andyzhangx/demo/blob/master/aks-engine/deployment/etc/kubernetes/azure.json)
10
10
2. serialize `azure.json` by following command:
11
+
11
12
```console
12
13
cat azure.json | base64 | awk '{printf $0}'; echo
13
14
```
14
15
15
16
3. create a secret file(`azure-cloud-provider.yaml`) with following values and fill in `cloud-config` value produced in step#2
17
+
16
18
```yaml
17
19
apiVersion: v1
18
20
data:
@@ -25,6 +27,19 @@ type: Opaque
25
27
```
26
28
27
29
4. Create a `azure-cloud-provider` secret in k8s cluster
30
+
28
31
```console
29
32
kubectl create -f azure-cloud-provider.yaml
30
33
```
34
+
35
+
### specify different cloud config secret in driver deployment
36
+
- available driver version: `v1.4.0`or above
37
+
- set `cloudConfigSecretName`, `cloudConfigSecretNamesapce` in driver deployment, follow [helm chart guide](../charts/README.md#tips)
0 commit comments