Porting edgecore of kubeedge to armhf
1. Cross compile the edgecore
About this topic, Please refer to this :https://blog.csdn.net/changqing1990/article/details/99633983
2. Install docker
If you use ubuntu/debain/Pi, you can use the get_docker.sh provided by docker government. this scripts can detect you CPU arch and download the right install package.
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sh get-docker.sh
If you non-debian system, such as yocto , you can access the https://download.docker.com/linux/static/stable/armhf/ to get the newest version static binary for docker-ce. Although you can use yocoto bb to build, but it’s a waste time 's way.
3. Create edge node
kube-proxy as a api-server’s proxy in every node, and it deployed by daemonset, that is once a k8s node is created, the kube-proxy will deployed to the node automaticlly.
But in kubeedge scene, kube-proxy in edge node is not needed. Because kube-proxy need to comunicate with api-server frequently,and not consider the case the network is lost at some times.
But edgenode is always in this state, and edgecore is designed for tolerating with this off line case.
To avoid the kube-proxy is deployed to the edgenode, you need taint the node, then other normal deployment will can’t deploy kube-proxy to this edgenode. If you want to deploy a app to edge node, you need to tolerate the taint node.
** Create the node**
node.json:
{
"kind": "Node",
"apiVersion": "v1",
"metadata": {
"name": "edgenode2",
"labels": {
"name": "edge-node",
"node-role.kubernetes.io/edge": ""
}
}
}
kubectl apply -f node.json
## taint the node
kubectl taint node edgenode2 \ node.kubernetes.io/kubeedge=:NoExecute
To tolerate the taint node, you need to add toleration in your deployment yaml, such as:
.........
spec:
........
tolerations:
- key: "node.kubernetes.io/kubeedge"
operator: "Exists"
effect: "NoExecute"
nodeSelector:
name: "edge-node"
.......