We will be installing CentOS 7 along with Docker, kubelet, kubeadm and kubectl on all of our 3 hosts.

The CentOS 7 image can be downloaded [here](lsmod | grep br_netfilter).

Once we have CentOS we need to install it on to our VM for lab purpose.

Prerequisites

We assume that you have CentOS 7 64-bit installation on all VMs with at least

Installing kubeadm, kubelet and kubectl

Reference: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl

We will install these packages on all of your etcd hosts:

This part is fairly easy. We do this for all nodes.

sudo cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg <https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg>
exclude=kubelet kubeadm kubectl
EOF

# Set SELinux in permissive mode (effectively disabling it)
sudo setenforce 0
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config

sudo yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

sudo systemctl enable --now kubelet

The kubelet is now restarting every few seconds, as it waits in a crashloop for kubeadm to tell it what to do.