Last active
March 16, 2022 10:02
-
-
Save chadmcrowell/f2221cf33185c8c52d6e793320d69678 to your computer and use it in GitHub Desktop.
Installing the Kubernetes Cluster - From CKA Course - Linux Academy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
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:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would suggest using