Deploy Edge Node Manually¶
Edge node can be registered automatically. But if you want to deploy edge node manually, here is an example.
- Generate node’s configuration file
cat>./node.json<<EOF
{
"kind": "Node",
"apiVersion": "v1",
"metadata": {
"name": $nodename,
"labels": {
"name": "$nodename",
"node-role.kubernetes.io/edge": ""
}
}
}
EOF
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 ./node.json