Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (37 sloc) 1.16 KB
#!/bin/bash
DOCKER_VERSION="5:19.03.0~3-0~ubuntu-bionic"
KUBERNETES_VERSION="1.15.1-00"
# turn off swap - for the Kubelet
swapoff -a
sudo sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
# install Docker 18.09 (https://docs.docker.com/install/linux/docker-ce/ubuntu/)
apt-get update
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
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_VERSION \
docker-ce-cli=$DOCKER_VERSION \
containerd.io
# install Kubeadm etc.
# Note - Bionic packages not available yet
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=$KUBERNETES_VERSION \
kubeadm=$KUBERNETES_VERSION \
kubectl=$KUBERNETES_VERSION
# set iptables for Flannel
sysctl net.bridge.bridge-nf-call-iptables=1
You can’t perform that action at this time.