curl -sSL get.docker.com | sh && \
sudo usermod pi -aG docker
sudo dphys-swapfile uninstall && \
sudo update-rc.d dphys-swapfile remove
Add this line at end of file.
cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list && \
sudo apt-get update -q && \
sudo apt-get install -qy kubelet=1.9.11-00 kubectl=1.9.11-00 kubeadm=1.9.11-00
sudo reboot
sudo kubeadm init --token-ttl=0 --apiserver-advertise-address=192.168.88.100 --pod-network-cidr=10.244.0.0/16 --ignore-preflight-errors=ALL
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
sudo mkdir -p /etc/cni/net.d
sudo cat > /etc/cni/net.d/10-flannel.conflist <<EOF
{
"name": "cbr0",
"plugins": [
{
"type": "flannel",
"delegate": {
"hairpinMode": true,
"isDefaultGateway": true
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
}
]
}
EOF
sudo kubeadm join 192.168.88.100:6443 \
--token 28115f.4dfba6838dfdbcf1 \
--discovery-token-ca-cert-hash sha256:14b227c334fe9d2293096b9c54944f8a6d1921348c03ded55b7bbce87a101883 \
--ignore-preflight-errors=all