Created
June 18, 2019 07:04
-
-
Save sfxworks/e4e98825bb705737cf6093fda7ea12a9 to your computer and use it in GitHub Desktop.
k8s-containerd-kubeadm
This file contains 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
#!/bin/bash | |
set -e | |
VERSION=1.2.6 | |
sudo apt-get update | |
sudo apt-get install libseccomp2 apt-transport-https curl -y | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
wget https://storage.googleapis.com/cri-containerd-release/cri-containerd-${VERSION}.linux-amd64.tar.gz | |
tar --no-overwrite-dir -C / -xzf cri-containerd-${VERSION}.linux-amd64.tar.gz | |
systemctl enable containerd | |
systemctl start containerd | |
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 kubeadm kubectl | |
apt-mark hold kubelet kubeadm kubectl | |
modprobe br_netfilter | |
echo '1' > /proc/sys/net/ipv4/ip_forward | |
#kubeadm join 198.18.2.118:6443 --token g009xk.yf6h5lntirbv8a1o \ | |
# --discovery-token-ca-cert-hash sha256:19b8fe2b7026d48d6f81917e87ae835e51dad5d7a8851d13fefd1b9ebcc53f04 | |
#Replace this join token for your worker nodes or become a slave of mine. I wish. That's an internal address. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment