The second node with hostname kubernetes-master also running Ubuntu 18.04 will be a slave node simply joining the Kuberneets cluster. Once we get the Kubernetes cluster up and running as a proof of concept we will deploy a Nginx server container.
This has a crap ton of errors in it… for example, both nodes are referred to as “kubernetes-master”, even when you show “kubernetes-slave” . might want to fix that
This doesn’t work for me. I’m running on Bionic Beaver and followed your steps exactly, however, the pods don’t ever enter the running state. I get the following error from syslog:
May 10 13:59:12 xvarix kubelet[24245]: W0510 13:59:12.542082 24245 cni.go:171] Unable to update cni config: No networks found in /etc/cni/net.d
May 10 13:59:12 xvarix kubelet[24245]: E0510 13:59:12.542190 24245 kubelet.go:2125] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
kubernetes doesn’t work…not the docker containers. Just ran into the same issue. the fix for me was to remove the swap partition in /etc/fstab by putting a # in front of it, reboot and kubernetes starts right up.
So I am not the best at Linux stuff. I am trying to learn. When I follow all the directions everything works fine minus the need to ‘sudo apt-get update’ after adding the repository. Up until I try to add a node to the cluster then all I can get is:
[discovery] Created cluster-info discovery client, requesting info from “https://<master_addr>:6443” [discovery] Failed to connect to API Server “<master_addr>:6443”: token id “6fbvvs” is invalid for this cluster or it has expired. Use “kubeadm token create” on the master node to creating a new valid token
I even tried the ‘kubeadm toek create’ and that token does not work either