The first step is to initialise a Kubernetes Master for managing workloads and a Node for running containers. The Container Network Interface (CNI) enables containers running on different nodes to communicate.
Master
To bootstrap the cluster run the tool Kubeadm. This downloads the required Docker Images, configures TLS security and starts the necessary containers.
kubeadm init --token=102952.1a7dd4cc8d1f4cc5 --kubernetes-version $(kubeadm version -o short)
Once the process has initialised the master, set the KUBECONFIG. The admin.conf file defines the TLS certificates and IP address of the master. This allows you to administrate the cluster remotely.
export KUBECONFIG=/etc/kubernetes/admin.conf
Node
The master is responsible for managing workloads, with nodes running the workloads. The command below uses the joins the Kubernetes cluster, providing the token and IP address for the master.
kubeadm join --discovery-token-unsafe-skip-ca-verification --token=102952.1a7dd4cc8d1f4cc5 [[HOST_IP]]:6443
Container Network Interface (CNI)
To allow containers to communicate across hosts there needs to be a Container Network Interface. In this scenario we recommend Weave Net but others are available.
kubectl apply -f /opt/weave-kube