Installation
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - (1)
cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list (2)
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
sudo apt-get update (3)
sudo apt-get install -y kubelet=1.15.7-00 kubeadm=1.15.7-00 kubectl=1.15.7-00 (4)
sudo apt-mark hold kubelet kubeadm kubectl (5)
-
Add the GPG key
-
Add the kubernetes repo to the sources list
-
Update the index
-
Install kubelet, kubeadm and kubectl
WarningIt’s important to use the same version for kubelet, kubeadm and kubectl. -
Freeze the version to avoid automatic updates
Verify Installation
Run the following command to verify that the installation was successful
kubeadm version