This guide covers how to install Sedna on existing KubeEdge environment, i.e. its two main components: GM(GlobalManager) and LC(LocalController).
Prerequisites¶
Kubectl with right kubeconfig
Kubernetes 1.16+ cluster running
KubeEdge v1.5+ running
Deploy Sedna¶
Currently GM is deployed as a deployment, and LC is deployed as a daemonset.
Because LC needs to connnect to GM, and the limit connection between cloud Pod and edge Pod, GM will be deployed to a cloud node where the edge node can access to.
More specifically, the GM node has a INTERNAL-IP or EXTERNAL-IP where edge node can access to directly.
For example, in a kind cluster kubectl get node -o wide:
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
edge-node Ready agent,edge 3d21h v1.19.3-kubeedge-v1.6.1 192.168.0.233 <none> Ubuntu 18.04.5 LTS 4.15.0-128-generic docker://20.10.2
sedna-control-plane Ready control-plane,master 3d21h v1.20.2 172.18.0.2 <none> Ubuntu 20.10 4.15.0-128-generic containerd://1.5.0-beta.3-24-g95513021e
In this example the node sedna-control-plane has a internal-ip 172.18.0.2, and edge-node can access it.
So we can set SEDNA_GM_NODE=sedna-control-plane in below instructions:
# set the right node where edge node can be access
# SEDNA_GM_NODE=sedna-control-plane
SEDNA_GM_NODE=CHANGE-ME-HERE
curl https://raw.githubusercontent.com/kubeedge/sedna/main/scripts/installation/install.sh | SEDNA_GM_NODE=$SEDNA_GM_NODE SEDNA_ACTION=create bash -
The way above will require the network to access github since it will download the sedna crd yamls. If you have unstable network to access github or existing sedna source, you can try the way:
# SEDNA_ROOT is the sedna git source directory or cached directory
export SEDNA_ROOT=/opt/sedna
curl https://raw.githubusercontent.com/kubeedge/sedna/main/scripts/installation/install.sh | SEDNA_GM_NODE=$SEDNA_GM_NODE SEDNA_ACTION=create bash -
Debug¶
Check the GM status:
kubectl get deploy -n sedna gm
Check the LC status:
kubectl get ds lc -n sedna
Check the pod status:
kubectl get pod -n sedna
Uninstall Sedna¶
# set the right node where edge node can be access
# SEDNA_GM_NODE=sedna-control-plane
SEDNA_GM_NODE=CHANGE-ME-HERE
curl https://raw.githubusercontent.com/kubeedge/sedna/main/scripts/installation/install.sh | SEDNA_GM_NODE=$SEDNA_GM_NODE SEDNA_ACTION=delete bash -