Add Edge Nodes
This section describes how to add an edge node.
Prerequisites
You should join a cluster and have the Node Management permission within the cluster. For more information, refer to "Cluster Members" and "Cluster Roles".
KubeEdge should have been installed and enabled.
The edge node to be added needs to be able to access the 30000, 30001, 30002, 30004 ports of the KubeSphere cluster master node.
The edge node has Docker, containerd, CRI-O, or Virtlet installed as the container runtime. KubeEdge use containerd by default as the runtime. For more information, see KubeEdge Documentation.
The SSH login information of the edge node has been obtained.
Configure Edge Node
Perform the following steps to configure EdgeMesh on the edge node.
Run the following command to edit the /etc/nsswitch.conf file:
vi /etc/nsswitch.conf
Add the following content to the /etc/nsswitch.conf file and save the file:
hosts: dns files mdns4_minimal [NOTFOUND=return]
Run the following command to enable IP forwarding on the edge node:
sudo echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
Run the following command to verify the configuration result:
sudo sysctl -p | grep ip_forward
If the following information is displayed, the configuration is successful:
net.ipv4.ip_forward = 1
Add Edge Node
Log in to the KubeSphere web console with a user who has the Node Management permission, and access your cluster.
Click Nodes > Edge Nodes in the left navigation pane.
Click Add on the right side of the page.
In the Add Edge Node dialog, set the parameters for the edge node.
Parameter Description Name
The name of the edge node. The system will automatically generate a name for the edge node, or you can manually set the name of the edge node. The name can only contain lowercase letters, numbers, and hyphens (-), must start and end with a lowercase letter or number, and can be up to 63 characters long.
Add Default Taint
Whether to add a taint to the edge node to prevent pods from being scheduled to the edge node.
Click Verify to generate the edge node configuration command.
Click Copy to copy the edge node configuration command to the clipboard, then make the following modifications.
Modify the ports in the edge node configuration command
10000,10001,10002,10004
to the ports exposed by the cloudcore service30000,30001,30002,30004
.Log in to the edge node and run the modified command.
Note Ensure that the edge node can access the KubeSphere cluster master node via the IP address specified by the --cloudcore-ipport parameter.
Ensure that the edge node can access the ports of KubeSphere cluster master node - 30000, 30001, 30002, 30004 respectively via the port numbers specified by the --cloudcore-ipport, --quicport, --certport, and --tunnelport parameters.
Depending on your network environment, you may need to configure firewall and traffic forwarding rules.
Refresh the Edge Nodes page of the KubeSphere web console. If the addition is successful, the edge node will be displayed in the edge node list.
Feedback
Was this page Helpful?
Receive the latest news, articles and updates from KubeSphere
Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.