-
-
Save iMilad/7ed3c5a2ecaa8c1670a1c6ca7320bf4f to your computer and use it in GitHub Desktop.
Installing the Kubernetes Cluster - From CKA Course - Linux Academy
This file contains 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-focal kubelet=1.19.0-00 kubeadm=1.19.0-00 kubectl=1.19.0-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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment