#cloud-config
merge_how: dict(recurse_array)+list(append)
write_files:
  - path: /etc/kubernetes/kubeconfig.yaml
    owner: "root:root"
    permissions: "0644"
    content: |
      apiVersion: v1
      kind: Config
      users:
      - name: kubeclient
        user:
          client-certificate: CLIENT_CERT
          client-key: CLIENT_KEY
      clusters:
      - name: kubernetes
        cluster:
          certificate-authority: CA_CERT
          server: KUBE_MASTER_URI
      contexts:
      - context:
          cluster: kubernetes
          user: kubeclient
        name: service-account-context
      current-context: service-account-context
