Skip to content

Instantly share code, notes, and snippets.

@kiloreux kiloreux/ Secret
Created Jan 6, 2018

What would you like to do?
#!/usr/bin/env bash
set -o pipefail
set -o errexit
set -o nounset
# set -o xtrace
sudo true
#Install docker
sudo apt-get -y install linux-image-extra-$(uname -r)
wget -qO- | sh
# Add user to docker group
sudo usermod -aG docker $USER
# Install Kubernetes
sudo apt-get update && sudo apt-get install -y apt-transport-https
sudo curl -s | apt-key add -
echo "deb kubernetes-xenial main"| sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
#Initialize kubeadm
sudo kubeadm init --pod-network-cidr=
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
# Install network flannel to handle networking between pods
kubectl apply -f
# Enable pods to run on master node
kubectl taint nodes --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.