Skip to content

Instantly share code, notes, and snippets.

@lsmithmier
Last active October 19, 2018 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lsmithmier/8766de515a0b3d9262173087808a4835 to your computer and use it in GitHub Desktop.
Save lsmithmier/8766de515a0b3d9262173087808a4835 to your computer and use it in GitHub Desktop.
Install K8s to Ubuntu
apt update
apt upgrade -y
apt dist-upgrade -y
apt autoremove -y
apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
apt update
apt install docker-ce -y
usermod -aG docker $USER
apt-get update -y && apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update -y
apt-get install -y kubelet kubeadm kubectl
apt-mark hold kubelet kubeadm kubectl
swapoff -a
sed -e '/.*/s/^#*/#/' -i /etc/fstab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment