-
-
Save clrxbl/c660b63f5810513b410112ab686d16b9 to your computer and use it in GitHub Desktop.
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
Control-plane: | |
PRIVATE_IFACE=eth1 | |
PUBLIC_IP=$(curl http://ifconfig.me) | |
PRIVATE_IP=$(ip -f inet addr show $PRIVATE_IFACE | awk '/inet / {print $2}' | cut -d/ -f1) | |
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" INSTALL_K3S_EXEC="--bind-address $PRIVATE_IP --node-ip $PRIVATE_IP --node-external-ip $PUBLIC_IP --advertise-address $PRIVATE_IP --disable-network-policy --no-deploy traefik --disable traefik --no-flannel --kubelet-arg address=$PRIVATE_IP --kube-apiserver-arg kubelet-preferred-address-types=InternalIP --cluster-cidr 172.16.0.0/16 --service-cidr 172.17.0.0/16 --cluster-dns 172.17.0.10" sh - | |
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml | |
Agents: | |
PRIVATE_IFACE=eth1 | |
PUBLIC_IP=$(curl http://ifconfig.me) | |
PRIVATE_IP=$(ip -f inet addr show $PRIVATE_IFACE | awk '/inet / {print $2}' | cut -d/ -f1) | |
MASTER_IP=cluster-endpoint | |
apt install open-iscsi -y | |
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--node-ip $PRIVATE_IP --node-external-ip $PUBLIC_IP --no-flannel --kubelet-arg address=$PRIVATE_IP" K3S_URL="https://${MASTER_IP}:6443" K3S_TOKEN=${TOKEN} sh - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment