Add cloud init file

This commit is contained in:
Jimmy 2022-02-08 14:53:24 +13:00
parent 97035584ff
commit ed3a4d085c
1 changed files with 26 additions and 0 deletions

26
cloud-init.yaml Normal file
View File

@ -0,0 +1,26 @@
#cloud-config
packages:
- fish
- git
snap:
commands:
- ["install", "microk8s", "--classic"]
- ["install", "kubectl", "--classic"]
system_info:
default_user:
name: ubuntu
shell: /usr/bin/fish
home: /home/ubuntu
groups: microk8s
runcmd:
- mkdir -p /home/ubuntu/.kube /home/ubuntu/.config/fish/completions
- microk8s config > /home/ubuntu/.kube/config
- kubectl completion fish > /home/ubuntu/.config/fish/completions/kubectl.fish
- chown -R ubuntu:ubuntu /home/ubuntu/.kube /home/ubuntu/.config/fish/completions
- microk8s enable dns ingress dashboard helm helm3