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. Use either Method A or Method B.
Method A
sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
sudo apt -y install software-properties-common
Method B
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