Skip to content

Instantly share code, notes, and snippets.

@yura415
Last active January 1, 2019 13:38
Show Gist options
  • Save yura415/20bbfa98856faa3e118615b892b55f85 to your computer and use it in GitHub Desktop.
Save yura415/20bbfa98856faa3e118615b892b55f85 to your computer and use it in GitHub Desktop.
# install docker
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 [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-get update
apt-get install -y docker-ce
docker run hello-world
# install kubeadm
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 https://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y kubelet kubeadm kubectl
apt-mark hold kubelet kubeadm kubectl
systemctl daemon-reload
systemctl restart kubelet
@yura415
Copy link
Author

yura415 commented Jan 1, 2019

SCRIPT_URL=https://gist.githubusercontent.com/yuricodes/20bbfa98856faa3e118615b892b55f85/raw/366b12fd08abbf3d0058dd1f7d599caaff7e8e71/prepare_kubeadm_docker.sh
bash <(curl -s $SCRIPT_URL)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment