登录
立即咨询

语言选择

谐云 谐云
在这里探索云原生
边缘计算KubeEdge基础框架与实践
2022年12月14日

什么是Kubernetes?

Kubernetes(K8s)是一款由谷歌开源的容器集群管理系统。它基于容器技术,为容器化的应用提供部署运行、资源调度、服务发现和动态伸缩等一系列功能。

什么是KubeEdge?

KubeEdge做的是基于k8s构建,并将容器化的应用编排和设备管理扩展到端上的主机。它由云端和边缘端组成,为网络、应用的部署以及云和边缘之间的元数据同步提供架构支持。KubeEdge理论上还是k8s的一个插件,它完成了k8s没有完成的事情,就是连接边缘、设备与云

KubeEdge的优点

1.离线模式:k8s在云端与node节点断连时,node节点恢复后就需要重新list-watch,但是在KubeEdge中,每个节点的Metadata被持久化,重启时不需要重新list-watch。

2.基于k8s: 借助KubeEdge,用户可以在Edge节点上编排应用,管理设备并监视应用和设备状态,就像云中的传统Kubernetes集群一样 大量的应用: 可以轻松地将现有的复杂机器学习,图像识别,事件处理和其他高级应用程序部署和部署到Edge。

3.可扩展:各个模块较为独立且轻量,我们可以通过更改或增减模块的办法,来扩展KubeEdge。

4.资源优化:边缘端的资源较少,而KubeEdge可以将一些不必要的模块关闭,减少资源的消耗,优化在边缘节点上资源的利用。

5.跨平台:兼容性极强,它不需要区分自己在什么云中,无论是私有云、公有云还是混合云,它都可以完美运行。

6.多架构:无论是x86还是arm架构,都可以运行KubeEdge。

7.开发简单:在添加设备和应用部署的方法上,KubeEdge还支持SDK,这样大大缩减了开发的流程。开发人员可以编写基于常规http或mqtt的应用程序,对其进行容器化,然后在Edge或Cloud中的任何位置运行它们中的更合适的一个。

8.易于维护:k8s所具有的升级、回滚、监控、警报等功能,KubeEdge也都拥有。这样更有利于维护方便。

9.支持边缘节点间的通信:通过在Edge上运行的业务逻辑,可以在生成数据的本地保护和处理大量数据。这减少了网络带宽需求以及边缘和云之间的消耗。这样可以提高响应速度,降低成本并保护客户的数据隐私。

KubeEdge基础概念

KubeEdge分三个部分,分别是云、边、端。

云负责应用和配置的校验和下发,由k8s组件和CloudCore组成,是整个系统的中枢大脑。

边负责运行应用和管理接入的设备,由EdgeCore和数据库SQLite组成,是系统中有一定自治能力的功能节点。

端代表设备。

所有Kubernetes的组件和指令,都可以在KubeEdge中执行。包括kubectl logs、kubectl create等指令,还有deployment、daemonset、statefulset、crd等资源对象,都可以在KubeEdge中使用。

KubeEdge架构

 

K8s组件

1.K8S API Server:提供k8s各类寺院对象的增删改查及watch等HTTP的REST借口,是整个系统的数据总线和数据中心。

云端组件

1.EdgeController: 管理Edge节点。 一种扩展的Kubernetes控制器,它管理边缘节点和pod元数据,来定义边缘节点。

2.DeviceController: 负责设备管理。一种扩展的Kubernetes控制器,用于管理设备,以便设备元数据/状态数据可以在边缘和云之间同步。

3.CloudHub: 云中的通信接口模块。一个Web套接字服务器,负责监视云端的更改、缓存和向EdgeHub发送消息。

边缘端组件

1.EdgeHub: Edge上负责与云服务交互的Web套接字客户端。 负责与用于边缘计算(如KubeEdge体系结构中的EdgeController)云服务交互的Web套接字客户端,。这包括同步云端资源更新到边缘,以及报告边缘端主机和设备状态对云的更改。

2.MetaManager:是Edged与EdgeHub之间的消息处理器,还负责将原数据存储到轻量级数据库(SQLite)或从中检索元数据。

3.DeviceTwin: 负责存储设备状态,处理设备属性,处理DeviceTwin操作,在边缘设备和边缘节点之间创建成员关系, 将设备状态同步到云以及在边缘和云之间同步DeviceTwin信息。它还为应用程序提供查询接口。

4.ServiceBus:充当用于发送/接收有关HTTP协议消息的接口

5.EventBus: 使用MQTT处理内部边缘通信。MQTT客户端与MQTT服务器(MQTT服务器)交互,为其他组件提供发布和订阅功能。

6.Edged: 管理节点生命周期的边缘节点模块。它可以帮助用户在边缘节点上部署容器化的工作负载或应用程序。

端组件

1.MQTT Broker:实质上EventBus就是一个MQTT Broker,它负责接收publisher的消息,并发送给相应的subscriber。

2.Mapper:设备上报到MQTT broker的一个中间组件,用于接收与转发设备消息。

数据库组件

1.NodeLevel DataStore:主要是SQLite

总结

KubeEdge作为K8s的一个拓展性插件,它依然依赖于K8s本身,不同于K3s,它对边缘端和设备端的支持,是通过对边缘与设备的强适应来完成的,而不是通过裁剪k8s本身。插件化也保证了它极轻量化和极高的性能,组件与组件之间相对的独立保证了解耦与功能的可开关,这些特性都表明它在边缘计算中是个非常实用的利器。

添加评论
谐云
2024年10月11日
I'm really impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you customize it yourself? Either way keep up the nice quality writing, it抯 rare to see a nice blog like this one these days..
添加回复
谐云
2024年10月11日
添加回复
回复:Hi, i think that i saw you visited my site thus i came to “return the favor”.I'm trying to find things to enhance my site!I suppose its ok to use some of your ideas!!
添加回复
回复:This information is invaluable. Where can I find out more?
添加回复
回复:Wonderful blog! Do you have any suggestions for aspiring writers? I'm hoping to start my own website soon but I'm a little lost on everything. Would you suggest starting with a free platform like Wordpress or go for a paid option? There are so many choices out there that I'm completely confused .. Any ideas? Many thanks!
添加回复
回复:Thanks on your marvelous posting! I quite enjoyed reading it, you are a great author. I will always bookmark your blog and will come back very soon. I want to encourage you to definitely continue your great posts, have a nice weekend!
添加回复
回复:I'm impressed, I have to admit. Rarely do I encounter a blog that's both educative and entertaining, and let me tell you, you have hit the nail on the head. The issue is an issue that too few folks are speaking intelligently about. Now i'm very happy that I came across this in my hunt for something relating to this.
添加回复
回复:Having read this I believed it was very enlightening. I appreciate you taking the time and energy to put this article together. I once again find myself spending a significant amount of time both reading and posting comments. But so what, it was still worthwhile!
添加回复
回复:Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You definitely know what youre talking about, why throw away your intelligence on just posting videos to your blog when you could be giving us something informative to read?
添加回复
回复:Every weekend i used to pay a quick visit this site, because i want enjoyment, for the reason that this this web page conations really good funny information too.
添加回复
回复:Terrific article! This is the kind of info that are meant to be shared across the web. Shame on Google for now not positioning this publish higher! Come on over and talk over with my website . Thanks =)
添加回复
回复:This website was... how do I say it? Relevant!! Finally I have found something which helped me. Kudos!
添加回复
回复:Its not my first time to visit this website, i am visiting this site dailly and take nice data from here everyday.
添加回复
回复:Hi there every one, here every person is sharing such know-how, so it's good to read this website, and I used to pay a visit this website everyday.
添加回复
回复:fantastic points altogether, you simply received a brand new reader. What may you recommend about your put up that you simply made some days ago? Any positive?
添加回复
回复:I am really loving the theme/design of your site. Do you ever run into any internet browser compatibility issues? A handful of my blog readers have complained about my website not working correctly in Explorer but looks great in Opera. Do you have any suggestions to help fix this problem?
添加回复
回复:If you wish for to get a great deal from this post then you have to apply these methods to your won website.
添加回复
回复:Hi there! This is my 1st comment here so I just wanted to give a quick shout out and tell you I genuinely enjoy reading your articles. Can you suggest any other blogs/websites/forums that go over the same topics? Thanks a ton!
添加回复
回复:Your style is really unique in comparison to other people I have read stuff from. Many thanks for posting when you've got the opportunity, Guess I'll just bookmark this site.
添加回复
回复:I read this piece of writing fully regarding the difference of most up-to-date and preceding technologies, it's amazing article.
添加回复
回复:Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.
添加回复
回复:Good day I am so thrilled I found your blog, I really found you by mistake, while I was searching on Bing for something else, Anyways I am here now and would just like to say thanks a lot for a fantastic post and a all round interesting blog (I also love the theme/design), I don’t have time to go through it all at the minute but I have bookmarked it and also added in your RSS feeds, so when I have time I will be back to read more, Please do keep up the awesome work.
添加回复
回复:You could certainly see your skills in the work you write. The world hopes for more passionate writers like you who aren't afraid to say how they believe. All the time follow your heart.
添加回复
回复:Hi there! Someone in my Myspace group shared this website with us so I came to take a look. I'm definitely loving the information. I'm bookmarking and will be tweeting this to my followers! Exceptional blog and great design.
添加回复
回复:My brother suggested I might like this blog. He was totally right. This post truly made my day. You can not imagine just how much time I had spent for this information! Thanks!
添加回复
谐云
2024年10月11日
添加回复
谐云 CpjJwWHV
2024年10月11日
555
添加回复
gBqsPxAZ回复CpjJwWHV:555
添加回复
gBqsPxAZ回复CpjJwWHV:555
添加回复
gBqsPxAZ回复CpjJwWHV:555
添加回复
gBqsPxAZ回复CpjJwWHV:555
添加回复
回复CpjJwWHV:
添加回复
回复CpjJwWHV:
添加回复
谐云 CpjJwWHV
2024年10月11日
555
添加回复
gBqsPxAZ回复CpjJwWHV:555
添加回复
gBqsPxAZ回复CpjJwWHV:555
添加回复
gBqsPxAZ回复CpjJwWHV:555
添加回复
gBqsPxAZ回复CpjJwWHV:555
添加回复
回复CpjJwWHV:
添加回复
回复CpjJwWHV:
添加回复
回复CpjJwWHV:
添加回复
回复CpjJwWHV:
添加回复
回复CpjJwWHV:
添加回复
申请合作咨询
您可以通过此表单填写您的合作意向,我们将会尽快与您取得联系!
或拨打电话0571-87607309
*姓名:
*手机:
*邮箱:
备注:
备注:
登录
登录
注册账号 忘记密码
注册
{{ code.btn }}
注册
立即登录 忘记密码?
忘记密码
{{ code.btn }}
确定
立即登录 忘记密码?
立即咨询