Creating a single control-plane cluster with kubeadm

Install and Deploy Kubernetes on Ubuntu 18.04 LTS

Note:

make sure to pass this parameter on init if you want to use flannel:

--pod-network-cidr=10.244.0.0/16

Bootstrapping

After all dependencies are installed and swap has been disabled:

  1. Run to initialize on the master: sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --kubernetes-version=1.18.2
  2. Run the following to enable kubectl:
    1. mkdir -p $HOME/.kube
    2. sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    3. sudo chown $(id -u):$(id -g) $HOME/.kube/config
  3. Run the command output by the master on each of the workers