Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.35 KB

read-from-secret.md

File metadata and controls

30 lines (24 loc) · 1.35 KB

Read cloud config from Kubernetes secrets

  • Available driver version: v0.5.0 or above

This driver also supports reading the cloud config 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.

How to convert cloud config to a Kubernetes secret

  1. create azure.json file and fill in all necessary fields, refer to Cloud provider config, and here is an example

  2. serialize azure.json by following command:

cat azure.json | base64 | awk '{printf $0}'; echo
  1. create a secret file(azure-cloud-provider.yaml) with following values and fill in cloud-config value produced in step#2
apiVersion: v1
data:
  cloud-config: [fill-in-here]
kind: Secret
metadata:
  name: azure-cloud-provider
  namespace: kube-system
type: Opaque
  1. Create a azure-cloud-provider secret in k8s cluster
kubectl create -f azure-cloud-provider.yaml