Just bootstrapped a single-node k3s on Container-O...
# k3s
w
Just bootstrapped a single-node k3s on Container-Optimized OS (GCPs docker-only immutable OS). Anything I'm missing? It was too easy! I'm assuming https://get.k3s.io does not work on this? I looked through the script and most of it's assumptions are that you have a package manager. For going into multi-node, i'll want an external datastore but other than that... I just need to use tls-san, a pre-chosen token, and...? do i need to run --cluster-init on the first k3s server up?
c
the only assumptions about package manager are for installing the selinux package. nothing else uses that.
The install script does assume that you are using systemd or openrc, and that things that are written to disk under /etc/rancher and /var/lib/rancher will stick around across reboots. We don’t test on COOS so I don’t know what other issues you may run into.
w
got it! That makes sense. I'm running k3s via docker itself and there was info for that on the site. /etc/rancher and /var/lib/rancher are in the docker containers and anything custom i need i've been creating via cloud-init and bind-mounting into it. i have tested rebooting the machine but once i go multi node i will need an external datastore for when any nodes, agent or server, get replaced? I haven't tried k3d but im considering it.
c
I would not recommend running K3s in docker if you are trying to set up a true multi-node cluster
w
yeah?
c
no, we don’t test that or support it. If you want multiple k3s nodes on multiple hosts, run it on the host itself - not in docker.
k3d is for running multi-node k3s cluster in docker on a single host. It does not support spanning hosts.
w
oh got it.
fun fun. I just have to get the k3s binary and install script onto the host itself. I can then use --docker on COS i assume (not married to docker but a like having the mostly immutable OS) Thank you for the guidance and input!