Debian 11 Bullseye
Sponsored Link

MicroK8s : Add Nodes2021/08/30

 
If you'd like to add more Nodes to your MicroK8s Cluster, Configure like follows.
[1] Display 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/695fca9d436fdee295792f85d3c2852b/e2906e671efc

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/695fca9d436fdee295792f85d3c2852b/e2906e671efc
[2] On a new Node, Install MicroK8s and join in Cluster.
root@node01:~#
apt -y install snapd sudo
root@node01:~#
echo 'export PATH=/snap/bin:$PATH' >> ~/.bashrc

root@node01:~#
source ~/.bashrc
root@node01:~#
snap install microk8s --classic

microk8s (1.21/stable) v1.21.3 from Canonical✓ installed
# run the command confirmed in [1]

root@node01:~#
microk8s join 10.0.0.30:25000/695fca9d436fdee295792f85d3c2852b/e2906e671efc

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>   27m   v1.21.3-3+90fd5f3d2aea0a
node01.srv.world   Ready    <none>   91s   v1.21.3-3+90fd5f3d2aea0a
[4] To remove a Node, Set like follows.
# on removal target node, run like follows

root@node01:~#
microk8s leave

Generating new cluster certificates.
Waiting for node to start.


# on primary node, run like follows

# specify Node name and run [remove-node]

# if remove forcely, add [--force] option

root@dlp:~#
microk8s remove-node node01.srv.world
root@dlp:~#
microk8s kubectl get nodes

NAME            STATUS   ROLES    AGE   VERSION
dlp.srv.world   Ready    <none>   30m   v1.21.3-3+90fd5f3d2aea0a
Matched Content