

Note: as we can see in the first screenshot, the option “–ignore-preflight-errors=all” was added, as we are running K8s in a container and if we omit it, then the join command will failĪt the end of the command output, it suggests to run the kubectl get nodes on the control-plane, which is now our cluster in the primary node: # Check the name of the cluster created Then in our second node, we can run the join command: # Check the name of the container running on the second nodeĭocker exec swarmenetes-mate-control-plane kubeadm join swarmenetes-control-plane:6443 -token w7yfju.klu2fedmcdi6yiqz -disĬovery-token-ca-cert-hash sha256:6f7b60592aab7e89e3383632cf95364e09b2656721cc77f64d6c8c6420b5f84f -ignore-preflight-errors=all # Create a new join token from inside the containerĭocker exec swarmenetes-control-plane kubeadm token create -print-join-command On our primary node, we can generate a new join command to be used on our second node cluster: # Check the name of the container running on the primary node And in the Swarm bind themĪs seen during our tests on the single node cluster, we will need to run the join command within the containers hosting both manager nodes. Now that our cluster is reset, we can get the join command from the cluster on the primary node and create our multi-nodes cluster. # Reset the configuration of the cluster on the second nodeĭocker exec swarmenetes-mate-control-plane kubeadm reset -f
SYNCTHING KUBERNETES INSTALL
Sudo apt update & sudo apt install -y apt-transport-https curlīefore we can run the join command against our cluster on the second node, we need to, literally, reset its configuration.Īnd to ensure the reset is “clean”, we will do it from within the container: # Check the name of the container running on the second node # Install (potential) dependencies packages So we can consider it as a warning and not error # Source documentation: This is normal as there is still no Kubernetes server running. Note: the last command shows a connection refused. # Check if kubectl has been correctly installed # Check if KinD has been correctly installedĬurl -LO "$(curl -s )/bin/linux/amd64/kubectl" # Move the binary to a directory contained in the $PATH variable # Change the permissions of the binary to be executable With Docker installed, we can now install KinD and the Kubernetes tools: # Source documentation:

Sudo update-alternatives -set ip6tables /usr/sbin/ip6tables-legacy Sudo update-alternatives -set iptables /usr/sbin/iptables-legacy If the command sudo service docker status shows that Docker is not running, it might be due to an issue with iptables.Īs described here, we can setup our WSL2 distro to use the legacy iptables, and start again Docker: # Source documentation: If the prerequisites are installed (it won’t be explain in this blog), then we already have an OS updated and Docker installed: The first step is to prepare the main host where, once the cluster will be created, we will run the commands to manage the cluster from there. And same as for the first node, we will install all the components needed (Docker, KinD, Kubernetes tools) Preparing the Swarm leader This will allow us to run the exact same commands, independent of the OS running beneath. The second host, as seen in the prerequisites, we will be using Canonical Multipass. We will not leverage Docker Desktop (see below: lessons learned). We will also install Docker, KinD and the Kubernetes tools directly on it.
SYNCTHING KUBERNETES WINDOWS
WSL OS: Ubuntu 20.04 from the Windows Store
SYNCTHING KUBERNETES WINDOWS 10
