使用“KubeEdge”管理边缘节点

随着物联网 (IOT)、人工智能 (AI) 行业的快速发展,各家公司都在探索将计算和智能推向前沿的方法。 边缘云计算带来了许多独特的挑战,如网络连接、网络性能和计算节点容量。目前的 Kubernetes 平台是为典型的数据中心环境而设计的,也许不能完全满足边缘场景。 本演示将回顾这些挑战以及 Kubernetes 的局限性。它还将讨论 “KubeEdge” 设计方案,以解决 Kubernetes 的局限性。“KubeEdge”是对 Kubernetes 边缘云环境平台的扩展。它支持离线自主 pod 执行、低内存边缘计算节点、边缘服务访问、注册和发现(边到数据中心云和边到边)等功能。
展开查看详情

1.Manage Edge Nodes with KubeEdge and Case Study Yulin Sun, yulin.sun@huawei.com; Li Xing, Li.xing1@huawei.com; Seattle Cloud Lab, Huawei R&D USA, Bellevue WA

2.Agenda • Edge scenarios/characters • KubeEdge Architecture • KubeBus • Edge metadata service • Kubernetes extension • Case study • Water utility management • Campus surveillance system

3.Edge Scenario/Characters (vs Data Center) • Similar requirement • Edge/Cloud nodes management • Application management • Inter-service communication • … • Edge special characters • Edge node running in private network • connect to Cloud behind NAT • Edge node’s connect to Cloud through Internet • Low bandwidth/High latency • Unstable connectivity • Heterogeneous hardware • Memory: 64MB ~ 100+ GB • CPU: AMD64/ARM/MIPS…

4.Manage Edge Nodes with KubeEdge K8S Master ETCD • Goal • Manage Edge Nodes K8S Node1 K8S Node2 K8S Node n Cloud together with Nodes in cloud as one Cluster EdgeController • Address the Edge special ... KubeBus characters Virtual Router • Edge nodes and cloud nodes in one VPN K8S Cluster • Edge nodes offline execution KubeEdge VPN autonomously • Lightweight edge agent • Components KubeBus KubeBus • KubeBus: Edge Network EdgeMetadataService EdgeMetadataService • EdgeMetadataService • Kubernetes extension App Engine App Engine ... Edge • Edge Controller • App Engine Edge Node Edge Node

5. KubeBus Cloud Cluster VM VM VM Container Network, e.g. Flannel 10.244.0.0/16 ... KubeBus ... Virtual Router Edge Network IP: 192.168.6.4 EIP: 35.160.180.205 192.168.23.129 192.168.23.130 VM IP: 192.168.23.131 • Scenario • Edge Nodes have no external IP and running behind NAT • One VM in Cloud Cluster has EIP • No direct connection between Edge nodes KubeBus KubeBus Edge Network: 192.168.6.2 Edge Network: 192.168.6.3 • Goal • Cloud VM and Edge nodes run as in one cluster Container Network 10.243.0.0/16 Container Network 10.242.0.0/16 ... • KubeBus Virtual Router • Public Endpoint for Edge connection • Router to connect EdgeNode EdgeNode • Cloud VM subnet • Cloud Container subnet • Edge Node virtual subnet Container • Edge Container subnet

6.Edge Metadata Service Cloud Cluster • Goal Cloud Service1 Cloud Service2 ... • Offline Edge Metadata Store CRUD CRUD • Cloud/Edge metadata bi-direction sync ETCD@Cloud • Component • Edge Metadata Store: Etcd Cloud • Sync Service: Configuration Status • Mirror data between Etcd@Cloud and Etcd@Edge • Base on Etcd watch/get Edge Edge MetadataService • Sync Algorithm SyncService • Eventually consistent • Atomic ETCD@Edge CRUD CRUD Edge Edge ... Service1 Service2 Edge Node

7. Edge Controller/App Engine • Goal Current Kubernetes Kubernetes edge extension • Offline autonomous – network connectivity KubeMaster KubeMaster • Only sync change data – network Configuration (Pod Spec) Status performance Edge Controller • Lightweight Kubelet – resource constrain edge node Etcd@Cloud • Components Sync Service • Edge Controller: representative of Edge nodes to talk to Kubelet Etcd@Edge KubeMaster • Get configuration (e.g. pod spec) App Engine • Reports Edge nodes status Compute Node Edge Node • AppEngine: Control containers

8.Case Study#1 --Water utilities management • Device • Liquid level sensor • Water pressure sensor • Valve actuator • Goal • Adjust valve based on water level of water tank in the area and water pressure nearby • Requirement • Management plane in Cloud • Edge to edge communication • Edge autonomous when offline … • Lightweight edge node

9.Case Study#2 --Campus surveillance system • Goal • Cloud/Edge collaborated campus surveillance system • Requirement • Workload balance between Edge/Cloud • Edge autonomous • Edge Cluster

10.Reference 1. Extend cloud execution environment to edge with KubeEdge, Yulin,Sun; Ying Xiong; Li Xing, Ying Huang, https://schd.ws/hosted_files/kccncchina2018chinese/cb/KubeEdge.pdf

11.