20 lines
427 B
Bash
20 lines
427 B
Bash
VIP=10.0.2.1
|
|
REMOTE_USER=titan
|
|
REMOTE_IP=$1
|
|
|
|
function set_remote() {
|
|
REMOTE="$REMOTE_USER@$REMOTE_IP"
|
|
}
|
|
|
|
function start_k3s() {
|
|
ssh -t $REMOTE "sudo -S systemctl start k3s"
|
|
}
|
|
|
|
function add_interface_label() {
|
|
HOSTNAME=$(ssh -t $REMOTE "hostname" | tr -d "\n\r")
|
|
|
|
echo "Please enter the vip interface name, (likely in the form: enpXs0):"
|
|
read INTERFACE
|
|
kubectl label nodes $HOSTNAME vip_interface=$INTERFACE --overwrite
|
|
}
|