Skip to content

Instantly share code, notes, and snippets.

@guidoffm
Created July 7, 2018 10:54
Show Gist options
  • Save guidoffm/88b98049d545714f84d09645b61df31e to your computer and use it in GitHub Desktop.
Save guidoffm/88b98049d545714f84d09645b61df31e to your computer and use it in GitHub Desktop.
Kubernetes on Raspbian
apt-get update && apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
echo "deb [arch=armhf] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update && apt-get install -y docker-ce=17.06.2~ce-0~debian
#swapoff -a
usermod -aG docker pi
systemctl disable dphys-swapfile
#vi /boot/cmdline.txt
sed -i "s/rootwait/rootwait cgroup_enable=cpuset cgroup_enable=memory/g" /boot/cmdline.txt
reboot
apt-get update && apt-get install -y apt-transport-https curl
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 http://apt.kubernetes.io/ kubernetes-xenial main
EOF
#apt-get update && apt-get install -y kubelet kubeadm kubectl
apt-get install -y kubelet=1.9.9-00 kubeadm=1.9.9-00 kubectl=1.9.9-00
kubeadm init --ignore-preflight-errors=cri --apiserver-advertise-address 192.168.3.143 --pod-network-cidr=10.244.0.0/16
kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
apt-mark hold kubeadm kubectl kubelet docker-ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment