How Do You Install These Kubernetes-Related Commands kubelet, kubeadm, kubectl, and etcd on an Ubuntu Server?

Problem scenario
You want to install kubelet, kubeadm, kubectl, and etcd on an Ubuntu server.  How do you do this?

Solution
1.  Run these five commands:

sudo apt-get -y update
sudo apt -y install docker.io
sudo su -
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
exit

2.  Edit the kubernetes.list file so the correct .deb packages are installed.

sudo vi /etc/apt/sources.list.d/kubernetes.list

# add this line below as the sole entry

deb http://apt.kubernetes.io/ kubernetes-xenial main

3.  Run these two commands:

sudo apt-get -y update
sudo apt-get -y install kubelet kubectl kubeadm etcd

Leave a comment

Your email address will not be published. Required fields are marked *