Skip to content

Instantly share code, notes, and snippets.

@xetys
Last active January 25, 2018 01:53
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 xetys/0ecfa01790debb2345c0883418dcc7c4 to your computer and use it in GitHub Desktop.
Save xetys/0ecfa01790debb2345c0883418dcc7c4 to your computer and use it in GitHub Desktop.
ubuntu16-kubeadm
#!/bin/bash
apt-get update
apt-get install -y \
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 https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) \
stable"
apt-get update && apt-get install -y docker-ce=$(apt-cache madison docker-ce | grep 17.03 | head -1 | awk '{print $3}')
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
apt-get install -y kubelet kubeadm kubectl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment