-
-
Save MeenachiSundaram/ac4741dcad74e86565e71e28017ff676 to your computer and use it in GitHub Desktop.
kubernetes user data script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get update | |
apt-get install -y git wget | |
# Install Docker | |
apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
#curl -fsSL get.docker.com | sh | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
sudo cat <<EOF > /etc/apt/sources.list.d/kubernetes.list | |
deb http://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
sudo apt-get update -y | |
sudo apt-get install -y docker.io 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
curl -s | bash -s --