Skip to content

Instantly share code, notes, and snippets.

@mpstein
Created June 16, 2020 15:27
Show Gist options
  • Save mpstein/8bd8c9ec15e20e07feb78d809e9c3e85 to your computer and use it in GitHub Desktop.
Save mpstein/8bd8c9ec15e20e07feb78d809e9c3e85 to your computer and use it in GitHub Desktop.
Install K8s on Ubuntu
#!/bin/bash
#another @geekmuse special
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
sudo apt-get update
sudo apt-get install -y docker-ce=18.06.1~ce~3-0~ubuntu kubelet=1.12.2-00 kubeadm=1.12.2-00 kubectl=1.12.2-00
sudo apt-mark hold docker-ce kubelet kubeadm kubectl
echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment