Skip to content

Instantly share code, notes, and snippets.

@rlaneyjr
Last active July 29, 2018 14:52
Show Gist options
  • Save rlaneyjr/5ee16b520b1ee7950e1650e4ff1d150f to your computer and use it in GitHub Desktop.
Save rlaneyjr/5ee16b520b1ee7950e1650e4ff1d150f to your computer and use it in GitHub Desktop.
Deploy Kubernetes
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install -y git wget
# Install Docker
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install -yq docker-ce
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 kubelet kubeadm kubectl kubernetes-cni
sudo sysctl net.bridge.bridge-nf-call-iptables=1
sudo swapoff -a
sudo rm -rf /var/lib/kubelet/*
sudo apt-get install -y nfs-common
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment