MicroK8s : Add Nodes2022/09/02 |
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. |
root@dlp:~# microk8s add-node From the node you wish to join to this cluster, run the following: microk8s join 10.0.0.30:25000/e604a9a0d1f6761fc9bc9aa6e1d19b99/6c4dceea330e Use the '--worker' flag to join a node as a worker not running the control plane, eg: microk8s join 10.0.0.30:25000/e604a9a0d1f6761fc9bc9aa6e1d19b99/6c4dceea330e --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/e604a9a0d1f6761fc9bc9aa6e1d19b99/6c4dceea330e |
[2] | On a new Node, Install MicroK8s and join in Cluster. |
root@node01:~#
snap install microk8s --classic microk8s (1.24/stable) v1.24.3 from Canonical✓ installed # run the command confirmed in [1] root@node01:~# microk8s join 10.0.0.30:25000/e604a9a0d1f6761fc9bc9aa6e1d19b99/6c4dceea330e Contacting cluster at 10.0.0.30 Waiting for this node to finish joining the cluster. .. .. .. .. |
[3] | On primary Node, Make sure a new Node has been added in Cluster. |
root@dlp:~# microk8s kubectl get nodes NAME STATUS ROLES AGE VERSION dlp.srv.world Ready <none> 22m v1.24.3-2+63243a96d1c393 node01.srv.world Ready <none> 88s v1.24.3-2+63243a96d1c393 |
[4] | To remove a Node, Set like follows. |
# leave from cluster on the target node first root@node01:~# microk8s leave Generating new cluster certificates. Waiting for node to start. # on primary node, remove the target node root@dlp:~# microk8s remove-node node01.srv.world
microk8s kubectl get nodes NAME STATUS ROLES AGE VERSION dlp.srv.world Ready <none> 199m v1.24.3-2+63243a96d1c393 |
Sponsored Link |
|