-
Copy
$GOPATH/src/github.com/kubeedge/kubeedge/build/node.json
to your working directory and changemetadata.name
to the name of edge nodemkdir -p ~/kubeedge/yaml cp $GOPATH/src/github.com/kubeedge/kubeedge/build/node.json ~/kubeedge/yaml
Node.json
{ "kind": "Node", "apiVersion": "v1", "metadata": { "name": "edge-node", "labels": { "name": "edge-node", "node-role.kubernetes.io/edge": "" } } }
Note:
-
the
metadata.name
must keep in line with edgecore's configmodules.edged.hostnameOverride
. -
Make sure role is set to edge for the node. For this a key of the form
"node-role.kubernetes.io/edge"
must be present inmetadata.labels
. If role is not set for the node, the pods, configmaps and secrets created/updated in the cloud cannot be synced with the node they are targeted for.
- Deploy edge node (you must run the command on cloud side)
kubectl apply -f ~/kubeedge/yaml/node.json