49 lines
1.4 KiB
Smarty
49 lines
1.4 KiB
Smarty
|
#cloud-config
|
||
|
---
|
||
|
apt:
|
||
|
sources:
|
||
|
tailscale.list:
|
||
|
source: deb https://pkgs.tailscale.com/stable/ubuntu jammy main
|
||
|
keyid: 2596A99EAAB33821893C0A79458CA832957F5868
|
||
|
kubernetes.list:
|
||
|
source: deb https://apt.kubernetes.io/ kubernetes-xenial main
|
||
|
keyid: A362B822F6DEDC652817EA46B53DC80D13EDEF05
|
||
|
docker.list:
|
||
|
source: deb https://download.docker.com/linux/ubuntu jammy stable
|
||
|
keyid: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
||
|
write_files:
|
||
|
- path: /etc/sysctl.d/k8s.conf
|
||
|
content: |
|
||
|
net.bridge.bridge-nf-call-iptables = 1
|
||
|
net.bridge.bridge-nf-call-ip6tables = 1
|
||
|
net.ipv4.ip_forward = 1
|
||
|
- path: /etc/modules-load.d/k8s.conf
|
||
|
content: |
|
||
|
overlay
|
||
|
br_netfilter
|
||
|
- path: /etc/containerd/config.toml
|
||
|
content: |
|
||
|
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
|
||
|
SystemdCgroup = true
|
||
|
disabled_plugins = []
|
||
|
- path: /root/k8s.yaml
|
||
|
content: |
|
||
|
apiVersion: kubelet.config.k8s.io/v1beta1
|
||
|
kind: KubeletConfiguration
|
||
|
cgroupDriver: systemd
|
||
|
packages:
|
||
|
- tailscale
|
||
|
- apt-transport-https
|
||
|
- ca-certificates
|
||
|
- curl
|
||
|
- kubelet
|
||
|
- kubeadm
|
||
|
- kubectl
|
||
|
- containerd.io
|
||
|
runcmd:
|
||
|
- [ modprobe, overlay ]
|
||
|
- [ modprobe, br_netfilter ]
|
||
|
- [ sysctl, --system ]
|
||
|
- [ tailscale, up, -auth-key, ${tailscale_key}, -ssh ]
|
||
|
- [ apt-mark, hold, kubelet, kubeadm, kubectl ]
|