#cloud-config
merge_how: dict(recurse_array)+list(append)
write_files:
  - path: /etc/kubernetes/config/worker-kubeconfig.yaml
    owner: "root:root"
    permissions: "0644"
    content: |
      apiVersion: v1
      kind: Config
      clusters:
      - name: local
        cluster:
          certificate-authority: /etc/kubernetes/ssl/ca.pem
      users:
      - name: kubelet
        user:
          client-certificate: /etc/kubernetes/ssl/worker.pem
          client-key: /etc/kubernetes/ssl/worker-key.pem
      contexts:
      - context:
          cluster: local
          user: kubelet
        name: kubelet-context
      current-context: kubelet-context
