File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,11 +12,7 @@ apt-get install -y \
1212 curl wget git unzip jq htop nano ufw \
1313 docker.io
1414
15- # Docker
16- systemctl enable --now docker
17- usermod -aG docker ubuntu # takes effect on next login for 'ubuntu'
18-
19- # Add swap space (2GB) to help with memory pressure
15+ # Add swap space (2GB) to help with memory pressure - BEFORE K3s starts
2016fallocate -l 2G /swapfile
2117chmod 600 /swapfile
2218mkswap /swapfile
@@ -26,6 +22,10 @@ echo '/swapfile none swap sw 0 0' >> /etc/fstab
2622# Configure swappiness (how aggressively to use swap - 10 is conservative)
2723echo ' vm.swappiness=10' >> /etc/sysctl.conf
2824
25+ # Docker
26+ systemctl enable --now docker
27+ usermod -aG docker ubuntu # takes effect on next login for 'ubuntu'
28+
2929# K3s (pin to stable; adjust as you like)
3030curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=stable sh -s - --write-kubeconfig-mode 640
3131
You can’t perform that action at this time.
0 commit comments