CentOS 8
Sponsored Link

MicroK8s : Add Nodes2020/08/12

 
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

Join node with: microk8s join 10.0.0.30:25000/a7219b548f8438850b3a8dceeb5e7687

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/a7219b548f8438850b3a8dceeb5e7687
 microk8s join 10.1.68.0:25000/a7219b548f8438850b3a8dceeb5e7687

# if Firewalld is running, allow ports

[root@dlp ~]#
firewall-cmd --add-port={25000/tcp,16443/tcp,12379/tcp,10250/tcp,10255/tcp,10257/tcp,10259/tcp} --permanent

[root@dlp ~]#
firewall-cmd --reload

[2]
[3] On a new Node, Install MicroK8s and join in Cluster.
[root@node01 ~]#
snap install microk8s --classic

microk8s v1.18.6 from Canonical installed
[root@node01 ~]#
export OPENSSL_CONF=/var/lib/snapd/snap/microk8s/current/etc/ssl/openssl.cnf

# if Firewalld is running, allow ports

[root@node01 ~]#
firewall-cmd --add-port={25000/tcp,10250/tcp,10255/tcp} --permanent

[root@node01 ~]#
firewall-cmd --reload

# run the command confirmed in [1]

[root@node01 ~]#
microk8s join 10.0.0.30:25000/a7219b548f8438850b3a8dceeb5e7687

[4] 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>   3h46m   v1.18.6-1+64f53401f200a7
node01.srv.world   Ready    <none>   40m     v1.18.6-1+64f53401f200a7
[5] To remove a Node, Set like follows.
# specify Node name and run [remove-node]

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

NAME            STATUS   ROLES    AGE   VERSION
dlp.srv.world   Ready    <none>   46m   v1.18.6-1+64f53401f200a7
Matched Content