diff --git a/CLUSTER.md b/CLUSTER.md index 3bc0231..2e01c0c 100644 --- a/CLUSTER.md +++ b/CLUSTER.md @@ -61,44 +61,24 @@ Network → VPN → `IPv6` → Search domains (Otsingudomeenid): `kube.k-space.e Created Ubuntu 22.04 VM-s on Proxmox with local storage. Added some ARM64 workers by using Ubuntu 22.04 server on Raspberry Pi. -After machines have booted up and you can reach them via SSH: - -``` -# Disable Ubuntu caching DNS resolver -systemctl disable systemd-resolved.service -systemctl stop systemd-resolved -rm -fv /etc/resolv.conf -cat > /etc/resolv.conf << EOF -nameserver 1.1.1.1 -nameserver 8.8.8.8 -EOF - -# Disable multipathd as Longhorn handles that itself -systemctl mask multipathd snapd -systemctl disable --now multipathd snapd bluetooth ModemManager hciuart wpa_supplicant packagekit - -# Permit root login -sed -i -e 's/PermitRootLogin no/PermitRootLogin without-password/' /etc/ssh/sshd_config -systemctl reload ssh -cat ~ubuntu/.ssh/authorized_keys > /root/.ssh/authorized_keys -userdel -f ubuntu -apt-get install -yqq linux-image-generic -apt-get remove -yq cloud-init linux-image-*-kvm -``` - -On master: - +First master: ``` kubeadm init --token-ttl=120m --pod-network-cidr=10.244.0.0/16 --control-plane-endpoint "master.kube.k-space.ee:6443" --upload-certs --apiserver-cert-extra-sans master.kube.k-space.ee --node-name master1.kube.k-space.ee ``` -For the `kubeadm join` command specify FQDN via `--node-name $(hostname -f)`. +Joining nodes: +``` +# On a master: +kubeadm token create --print-join-command + +# Joining node: +> /etc/systemd/system/kubelet.service.d/10-kubeadm.conf -systemctl daemon-reload -systemctl restart kubelet -``` - ## Technology mapping Our self-hosted Kubernetes stack compared to AWS based deployments: