This method will guide you to deploy the edge part into a k8s cluster,
so you need to login to the k8s master node (or where else if you can
operate the cluster with kubectl
).
The manifests and scripts in github.com/kubeedge/kubeedge/build/edge/kubernetes
will be used, so place these files to somewhere you can kubectl with.
First, ensure your k8s cluster can pull edge core image. If the image not exist. We can make one, and push to your registry.
- Check the container runtime environment
cd $GOPATH/src/github.com/kubeedge/kubeedge/build/edge
./run_daemon.sh prepare
- Build edge core image
cd $GOPATH/src/github.com/kubeedge/kubeedge
make edgeimage
We create k8s resources from the manifests in name order. Before creating, check the content of each manifest to make sure it meets your environment.
Firstly you need to copy edge certs including edge.crt
and edge.key
into the folder
/etc/kubeedge/certs/
on the k8s nodes where you want to deploy edge part.
On the other side, you need to replace 0.0.0.0:10000
with your kubeedge cloud web socket url.
The default edge node name is edgenode1
,
if you want to change edge node name or add new edge node,
you need to replace the following places with your new edge node name.
- name in 02-edgenode.yaml
- url in 03-configmap-edgenodeconf.yaml
- node-id in 03-configmap-edgenodeconf.yaml
- hostname-override in 03-configmap-edgenodeconf.yaml
- name in 04-deployment-edgenode.yaml
for resource in $(ls *.yaml); do kubectl create -f $resource; done