MicroK8s : Add Nodes2026/05/19 |
|
If you'd like to add more Nodes to your MicroK8s Cluster, Configure like follows. |
|
| [1] | Make sure commands to join in Cluster on primary Node. |
|
ubuntu@dlp:~$ microk8s add-node From the node you wish to join to this cluster, run the following: microk8s join 10.0.0.30:25000/24b126da30f4065f74b1f6ab2461d946/6794713e803e Use the '--worker' flag to join a node as a worker not running the control plane, eg: microk8s join 10.0.0.30:25000/24b126da30f4065f74b1f6ab2461d946/6794713e803e --worker If the node you are adding is not reachable through the default interface you can use one of the following: microk8s join 10.0.0.30:25000/24b126da30f4065f74b1f6ab2461d946/6794713e803e microk8s join 10.0.0.253:25000/24b126da30f4065f74b1f6ab2461d946/6794713e803e |
| [2] | On a new Node, Install MicroK8s and join in Cluster. Just enter the command as shown on the primary node. If you want to add it as a Worker node, add the [--worker] option. |
|
root@node01:~#
snap install microk8s --classic 2026-05-19T04:19:31Z INFO Waiting for automatic snapd restart... microk8s (1.34/stable) v1.34.5 from Canonical✓ installed # run the command confirmed in [1] root@node01:~# microk8s join 10.0.0.30:25000/24b126da30f4065f74b1f6ab2461d946/6794713e803e --worker
Contacting cluster at 10.0.0.30
The node has joined the cluster and will appear in the nodes list in a few seconds.
This worker node gets automatically configured with the API server endpoints.
If the API servers are behind a loadbalancer please set the '--refresh-interval' to '0s' in:
/var/snap/microk8s/current/args/apiserver-proxy
and replace the API server endpoints with the one provided by the loadbalancer in:
/var/snap/microk8s/current/args/traefik/provider.yaml
Successfully joined the cluster.
|
| [3] | After a few minutes on primary Node, Make sure a new Node has been added in Cluster. |
|
ubuntu@dlp:~$ microk8s kubectl get nodes NAME STATUS ROLES AGE VERSION dlp.srv.world Ready <none> 52m v1.34.5 node01.srv.world Ready <none> 8m43s v1.34.5 |
| [4] | To remove a Node, Set like follows. |
|
# leave from cluster on the target node first root@node01:~# microk8s leave Configuring services. Generating new cluster certificates. Waiting for node to start. # on primary node, remove the target node ubuntu@dlp:~$ microk8s remove-node node01.srv.world
microk8s kubectl get nodes NAME STATUS ROLES AGE VERSION dlp.srv.world Ready <none> 55m v1.34.5 |
| Sponsored Link |
|
|