-
-
Save chadmcrowell/f2221cf33185c8c52d6e793320d69678 to your computer and use it in GitHub Desktop.
# Get the Docker gpg key | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# Add the Docker repository | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
# Get the Kubernetes gpg key | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
# Add the Kubernetes repository | |
cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
deb https://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
# Update your packages | |
sudo apt-get update | |
# Install Docker, kubelet, kubeadm, and kubectl | |
sudo apt-get install -y docker-ce=5:19.03.12~3-0~ubuntu-bionic kubelet=1.17.8-00 kubeadm=1.17.8-00 kubectl=1.17.8-00 | |
# Hold them at the current version | |
sudo apt-mark hold docker-ce kubelet kubeadm kubectl | |
# Add the iptables rule to sysctl.conf | |
echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee -a /etc/sysctl.conf | |
# Enable iptables immediately | |
sudo sysctl -p |
as of 07/28/20 only this version was available
sudo apt-get install -y docker-ce=5:19.03.9~3-0~ubuntu-focal
kubelet=1.17.8-00 kubeadm=1.17.8-00 kubectl=1.17.8-00
for the acloud.guru provided lab servers I needed to run:
sudo modprobe br_netfilter
to be able to add iptables rules
@KajKandler I also noticed that only docker-ce=5:19.03.9~3-0~ubuntu-focal
was available on the lab servers. This appears to be due to the servers being upgraded to Ubuntu 20.04 (Focal Fossa).
I would suggest using
sudo apt-get install -y docker-ce=18.06.0~ce~3-0~ubuntu kubelet=1.18.5-00 kubeadm=1.18.5-00 kubectl=1.18.5-00
when I try to install both versions for the deleted node and recreated new node
root@4748e5513c3c:# sudo apt install -y docker-ce=5:19.03.103-0ubuntu-focal kubelet=1.18.5-00 kubeadm=1.18.5-00 kubectl=1.18.5-003-0
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '5:19.03.10ubuntu-focal' for 'docker-ce' was not found# ^Cubelet=1.18.5-00 kubeadm=1.18.5-00 kubectl=1.18.5-00
root@4748e5513c3c:
root@4748e5513c3c:# sudo apt-get install -y docker-ce=18.06.0ce3-0ubuntu kubelet=1.18.5-00 kubeadm=1.18.5-00 kubectl=1.18.5-00
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '18.06.0ce3-0ubuntu' for 'docker-ce' was not found#
root@4748e5513c3c:
Suggested revision:
L21
sudo apt-get install -y docker-ce=5:19.03.12
3-0ubuntu-focal kubelet=1.17.8-00 kubeadm=1.17.8-00 kubectl=1.17.8-00