Skip to content

Instantly share code, notes, and snippets.

Forked from initcron/
Created January 29, 2020 07:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
kubernetes user data script
apt-get update
apt-get install -y git wget
# Install Docker
apt-get install \
apt-transport-https \
ca-certificates \
curl \
curl -fsSL | sudo apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository \
"deb [arch=amd64] \
$(lsb_release -cs) \
apt-get update
apt-get install -yq docker-ce
curl -s | sudo apt-key add -
sudo cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb kubernetes-xenial main
sudo apt-get update -y
sudo apt-get install -y kubelet kubeadm kubectl kubernetes-cni nfs-common
sudo sysctl net.bridge.bridge-nf-call-iptables=1
sudo swapoff -a
sudo rm -rf /var/lib/kubelet/*
sudo apt-get install nfs-common -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment