
If the kubeadm and kubectl version is not consistent on master and worker nodes, we will get some error like: sudo docker run -d -p 5000:5000 -restart=always -name registry registry:2.And restart the docker service: service docker restart (Or systemctl restart docker)
Docker network sandbox join failed update#
Create or update /etc/docker/daemon.json. On each node machine, change insecure docker registry setting on all nodes. Example:ĭocker run -d -p 5000:5000 -e REGISTRY_STORAGE_DELETE_ENABLED=true -restart=always -name registry registry:2 Switch to the worker1 system and enter the command you noted from Step 7: Verify that everything is running and communicating: kubectl get pods -all-namespaces Step 10: Join Worker Node to Cluster Next, enter the following to create a directory for the cluster: kubernetes-master:~$ mkdir -p $HOME/.kube kubernetes-master:~$ sudo cp -i /etc/kubernetes/nf $HOME/.kube/config kubernetes-master:~$ sudo chown $(id -u):$(id -g) $HOME/.kube/config Step 9: Deploy Pod Network to Cluster This will be used to join the worker nodes to the cluster. Once this command finishes, it will display a kubeadm join message at the end. Switch to the master server node, and enter the following: sudo kubeadm init -pod-network-cidr=10.244.0.0/16 You may need to rerun: sudo swapoff -a Step 8: Initialize Kubernetes on Master Node Next, set a worker node hostname by entering the following on the worker server: sudo hostnamectl set-hostname worker1ġ27.0.0.1 worker1 You need to do for the worker2 node too. Then enter the command: sudo hostnamectl set-hostname master-node Start by disabling the swap memory on each server: sudo swapoff -a Step 7: Assign Unique Hostname for Each Server Nodeĭecide which server to set as the master node. Verify the installation with: kubeadm versionģ.
Docker network sandbox join failed install#
Install Kubernetes tools with the command: sudo apt-get install kubeadm kubelet kubectl sudo apt-mark hold kubeadm kubelet kubectlĢ. To add them, enter the following: sudo apt-add-repository "deb kubernetes-xenial main" Kubernetes is not included in the default repositories. Then repeat the previous command to install the signing keys.

If you get an error that curl is not installed, install it with: sudo apt-get install curlĢ. Enter the following to add a signing key: curl -s | sudo apt-key add To start Docker if it’s not running: sudo systemctl start dockerģ. Verify Docker is running: sudo systemctl status docker Set Docker to launch at boot by entering the following: sudo systemctl enable dockerĢ. Check the installation (and version) by entering the following: docker ––version Step 2: Start and Enable Dockerġ.

Repeat the process on each server that will act as a node.Ĥ. Next, install Docker with the command: sudo apt-get install docker.ioģ. Update the package list with the command: sudo apt-get updateĢ.
