Skip to content

Instantly share code, notes, and snippets.

@ruanbekker
Created January 6, 2020 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruanbekker/8d49daeae1d987c644462fa95443f1b8 to your computer and use it in GitHub Desktop.
Save ruanbekker/8d49daeae1d987c644462fa95443f1b8 to your computer and use it in GitHub Desktop.
K3s Multi Node with Multipass

Single Node Install

Setup the master node as instructed here:

Multi Node Setup

Provision a Worker Node:

$ multipass launch bionic --name k3s-node-1 --cloud-init=./cloud-init.yaml

Set the Master and Agent IP's to your environment:

$ export K3S_MASTER=$(multipass info k3s-master | grep 'IPv4' | awk '{print $2}')
$ export K3S_AGENT=$(multipass info k3s-node-1 | grep 'IPv4' | awk '{print $2}')

Install the agent and join the cluster:

$ k3sup join --server-ip ${K3S_MASTER} --ip ${K3S_AGENT} --user multipass --ssh-key ~/.ssh/multipass

View the nodes:

$ kubectl get node -o wide
NAME         STATUS   ROLES    AGE   VERSION         INTERNAL-IP    EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION      CONTAINER-RUNTIME
k3s-master   Ready    master   17m   v1.16.3-k3s.2   192.168.64.3   <none>        Ubuntu 18.04.3 LTS   4.15.0-72-generic   containerd://1.3.0-k3s.5
k3s-node-1   Ready    <none>   15s   v1.16.3-k3s.2   192.168.64.7   <none>        Ubuntu 18.04.3 LTS   4.15.0-72-generic   containerd://1.3.0-k3s.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment