Install k3s on master node:
curl -sfL https://get.k3s.io | sh -
# get token
cat /var/lib/rancher/k3s/server/node-token
Install k3s on worker nodes as agents:
for node in node1 node2 node3;do | |
multipass launch -n $node | |
done | |
# Init cluster on node1 | |
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -" | |
# Get node1's IP | |
IP=$(multipass info node1 | grep IPv4 | awk '{print $2}') |
Install k3s on master node:
curl -sfL https://get.k3s.io | sh -
# get token
cat /var/lib/rancher/k3s/server/node-token
Install k3s on worker nodes as agents: