#cloud-config hostname: ${hostname} manage_etc_hosts: true users: - name: k3s groups: sudo shell: /bin/bash sudo: ALL=(ALL) NOPASSWD:ALL ssh_authorized_keys: - ${ssh_public_key} package_update: true packages: - curl write_files: - path: /etc/rancher/k3s/config.yaml permissions: '0600' content: | token: "${k3s_token}" tls-san: - "${hostname}" - "${k8s_api_hostname}" runcmd: - curl -sfL https://get.k3s.io | sh -s - server - mkdir -p /home/k3s/.kube - k3s kubectl config view --raw > /home/k3s/.kube/config - chown -R k3s:k3s /home/k3s/.kube