This repository holds the notebooks and examples that will be shown in the Inference on (the) KubeEdge
talk during the Open Source Summit EU 2020.
The accompanying slides can be found here.
Most examples require you to have a Kubernetes cluster with KubeEdge installed, as well as a edge device in-sync with the cloud side. We've included some Helm charts and config files that should help you get started.
These instructions haven't been tested fully across multiple environments, so they are provided as-is! If you run into any issues, you should check each project's relevant docs:
You can use Kind to run a local cluster.
We've included a config file that exposes the ports used by cloudcore
.
Once you've got Kind installed, it should be enough to run:
!kind create cluster \
--config=./config/kind.yaml \
--name kubeedge
We've included a simple Helm chart that installs cloudcore
, the cloud-side component of KubeEdge, exposing the ports 10000
and 10002
used to sync with the edge-side.
If you've got Helm installed, it should be enough to run:
⚠️ Make sure you are pointing to your local Kind cluster!
!kubectl create ns kubeedge
!helm install \
kubeedge \
./charts/kubeedge \
--namespace kubeedge
Through our examples we've used a Raspberry Pi 3 Model B V1.2 with an ARM architecture of 32 bits.
This device will need to have the edge-side component of KubeEdge (edgecore
) installed and running.
To do this, we can use the keadm
tool, built by the KubeEdge project.
To install it an edge device you can download it directly from the project's GitHub release page.
You can also leverage the included Makefile
target as:
⚠️ This needs to be run on the edge-side!
!make install-keadm
Once downloaded, you will need to join the device to the cluster. To do this, you first need a secret token from the cloud-side. This token can be retrieved as:
⚠️ Note that this command needs to run on the cloud side!
!kubectl get secret \
-n kubeedge \
tokensecret \
-o=jsonpath='{.data.tokendata}' | base64 -d
Once keadm
is installed and we've got the token, we can then join to the cloud side by running:
⚠️ This needs to be run on the edge-side!
!sudo keadm join \
--cloudcore-ipport=${CLOUD_SIDE_IP}:10000 \
--token=${CLOUD_SECRET_TOKEN} \
--interfacename ${INTERNET_INTERFACE:wlan0} \
-i raspberry
Once your environment is set up, you can check the examples shown during the talk: