Last active
July 3, 2020 14:49
-
-
Save jgavinray/ccaeb3028299cdb79b0354ddc9b8a78d to your computer and use it in GitHub Desktop.
Install K3s from scratch - from local machine
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
# Assumptions below: | |
# Your local user has ssh access to the server and agent machines | |
# Your user on those machines is a sudo user with NOPASSWD configured | |
export USER=$(whoami) | |
export SERVER_IP=192.168.0.25 | |
export AGENT_1_IP=192.168.0.26 | |
export AGENT_2_IP=192.168.0.27 | |
export AGENT_3_IP=192.168.0.28 | |
export AGENT_4_IP=192.168.0.29 | |
export AGENT_5_IP=192.168.0.30 | |
ssh $USER@$SERVER_IP 'curl -sLS https://get.k3sup.dev | sh' | |
ssh $USER@$SERVER_IP 'sudo install k3sup /usr/local/bin/' | |
ssh $USER@$SERVER_IP "k3sup install --ip $SERVER_IP --user $USER" | |
ssh $USER@$SERVER_IP "k3sup join --ip $AGENT_1_IP --server-ip $SERVER_IP --user $USER" | |
ssh $USER@$SERVER_IP "k3sup join --ip $AGENT_2_IP --server-ip $SERVER_IP --user $USER" | |
ssh $USER@$SERVER_IP "k3sup join --ip $AGENT_3_IP --server-ip $SERVER_IP --user $USER" | |
ssh $USER@$SERVER_IP "k3sup join --ip $AGENT_4_IP --server-ip $SERVER_IP --user $USER" | |
ssh $USER@$SERVER_IP "k3sup join --ip $AGENT_5_IP --server-ip $SERVER_IP --user $USER" | |
ssh $USER@$SERVER_IP 'cat ~/kubeconfig' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment