

Sudo sed -i -e '/swap/d' /etc/fstab Create the cluster using kubeadm See the GitHub issue regarding swap on Kubernetes for details. The swap feature has to be disabled because it is not supported by Kubernetes.

Sudo apt-mark hold kubelet kubeadm kubectl Ensure swap is disabled # Prevent them from being updated automatically
#Install kubernetes cluster ubuntu install#
Sudo apt-get install -y kubelet kubeadm kubectl Sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg \Įcho "deb kubernetes-xenial main" \ You need to ensure the versions of kubeadm, kubelet and kubectl are compatible. Sudo usermod -aG docker $USER Install kubeadm, kubelet & kubectl # Allow current user access to docker command line # Restart docker to load new configuration Sudo mkdir -p /etc/docker cat <

Sudo apt-get remove -y docker docker-engine \ docker.io containerd runcĬurl -fsSL \ | sudo gpg -dearmor \ -o /usr/share/keyrings/docker-archive-keyring.gpgĮcho \ "deb $(lsb_release -cs) stable" \ | sudo tee /etc/apt//docker.list # Remove all other versions of docker from your system Installing docker from the official docker repository as this is the recommended way. Sudo apt-get install -y apt-transport-https ca-certificates \Ĭurl g nupg lsb-release Install docker from official repository Some packages need to be installed on your system for the commands we’re going to use later. By following this post you can easily create a Single-node Kubernetes Cluster using kubeadm on Ubuntu 20.04. Although it is more difficult to create a cluster with kubeadm, with its configuration options you can tweak the cluster to your needs. There are many tools out there to provision single-node Kubernetes clusters but kubeadm is the way to go for a production-like set-up.
