Created
May 4, 2020 10:23
-
-
Save sfxworks/b1219291285db989ecc673da27bdcc35 to your computer and use it in GitHub Desktop.
Join 757dev cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Prepare | |
modprobe br_netfilter | |
echo '1' > /proc/sys/net/ipv4/ip_forward | |
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf | |
net.bridge.bridge-nf-call-ip6tables = 1 | |
net.bridge.bridge-nf-call-iptables = 1 | |
EOF | |
#Install | |
#Zerotier | |
curl -s 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg' | gpg --import && \ | |
if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi | |
#Containerd | |
apt-get install -y containerd | |
#kubeadm/kubelet | |
sudo apt-get update && sudo 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 | tee /etc/apt/sources.list.d/kubernetes.list | |
deb https://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
apt-get update | |
apt-get install -y kubelet kubeadm | |
apt-mark hold kubelet kubeadm | |
#ipvs | |
apt-get install ipset -y | |
#If on Rasp PI 4, enable cgroups for mem | |
#https://askubuntu.com/a/1190457/719930 | |
#And restart | |
#Request to join | |
zerotier-cli join b6079f73c6adf9d1 | |
#Beyond this point requires approval. Contact adm/have them approve CSR for kubelet during join request. | |
echo "KUBELET_EXTRA_ARGS=--node-ip=$NODE_IP_PROVIDED_BY_ADMIN" > /etc/default/kubelet | |
systemctl daemon-reload | |
systemctl restart kubelet | |
kubeadm join lab.k8s757.dev:6443 --token 757dev.c0i41tklcxemnze7 --discovery-token-ca-cert-hash sha256:01ef7baef9d250dcf764d449ac282e91666c8483bfc74994c84cc39b66301a62 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment