跳到主要内容

· 阅读需 3 分钟

KubeEdge v1.17 is now available! This latest release introduces several new features and enhancements, including support for edge pods using InClusterConfig to access the Kubernetes API server, video streaming data reporting in Mappers, auto-restarting for EdgeCore modules, and more.

1.17 What's New

Release Highlights

Support Edge Pods Using InClusterConfig to Access Kube-APIServer

The InClusterConfig mechanism enables cloud pods to directly access the Kubernetes API server. With this release, KubeEdge now supports edge pods using the InClusterConfig mechanism to access the Kube-APIServer directly, even when the edge and cloud are in different network environments.

Refer to the link for more details. (#5524, #5541)

Mapper Supports Video Streaming Data Reporting

Previously, Mappers could only process structured device data. In v1.17, video stream data processing features have been added to the Mapper-Framework.

  • Edge Camera Device Management

    v1.17 provides a built-in Mapper based on the Onvif protocol, which can manage Onvif network camera devices into the KubeEdge cluster and obtain the camera's authentication file and RTSP video stream.

  • Video Stream Data Processing

    Video stream data processing capabilities have been introduced to the Mapper-Framework data plane. The video stream reported by edge camera devices can be saved as frame files or video files.

Refer to the link for more details. (#5448, #5514, mappers-go/#127)

Support Auto-Restarting for Edge Modules

EdgeCore modules could previously fail to start due to non-configurable and recoverable matters like process start order issues. In v1.17, the BeeHive framework has been improved to support automatically restarting modules. Users can now configure EdgeCore modules to automatically restart instead of restarting the entire component.

Refer to the link for more details. (#5509, #5513)

Introduce keadm ctl Command to Support Pods Query and Restart at Edge

The new keadm ctl command has been introduced in v1.17, allowing users to query and restart pods on edge nodes when they are offline:

  • Query: keadm ctl get pod [flags]
  • Restart: keadm ctl restart pod [flags]

Refer to the link for more details. (#5504)

Keadm Enhancements

Several enhancements were made to the keadm installation tool:

  • Refactored the keadm init command
  • Changed the command keadm generate to keadm manifest
  • Added image-repository flag to keadm join to support customization
  • Split the keadm reset command into keadm reset cloud and keadm reset edge.

Refer to the link for more details. (#5317)

Add MySQL to Mapper Framework

The Mapper Framework data plane now includes MySQL database support in its pushMethod. When using MySQL, basic configuration parameters for the MySQL client need to be added in the DeviceInstance.

Refer to the link for more details. (#5376)

Upgrade Kubernetes Dependency to v1.28.6

The vendored Kubernetes version has been upgraded to v1.28.6, users are now able to use the latest features on both the cloud and edge side.

Refer to the link for more details. (#5412)

Important Steps before Upgrading

  • To use the InClusterConfig feature for edge pods, you need to enable the metaServer and dynamicController switches, and set featureGates.requireAuthorization=true in the CloudCore and EdgeCore configuration files.

  • To use the Auto-Restarting for Edge Modules feature, you must enable the moduleRestart feature gate in EdgeCore.

Download the v1.17.0 release from the release page and upgrade today to take advantage of these new capabilities!

· 阅读需 30 分钟

开源之夏介绍

开源之夏是由中国科学院软件研究所“开源软件供应链点亮计划”发起并长期支持的一项暑期开源活动,旨在鼓励在校学生积极参与开源软件的开发维护,培养和发掘更多优秀的开发者,促进优秀开源软件社区的蓬勃发展,助力开源软件供应链建设。学生通过远程线上协作方式,通过社区资深导师指导,参与到开源社区各组织项目开发中,并收获证书及最高12000元奖金。活动官网:https://summer-ospp.ac.cn/

开源之夏学生报名4月30日正式开启。KubeEdge云原生边缘计算社区已连续4年参与开源之夏,在本届开源之夏共带来 18个 精选课题,包括应用与 算法创新、AI大模型、机器学习、深度学习、系统研发与集成 等多个领域,由来自 高校、产业等资深学者、产业巨擘与技术领英组成的导师带队,为同学们引领迈向顶尖开发者之路。历届开源之夏KubeEdge社区课题聚焦行业前沿方向,为学生职业生涯增添浓墨重彩的一笔,多位入选组委会官方优秀学生。

为帮助学生更好地了解与选报课题,KubeEdge社区将于 5月8日、5月9日 开展课题线上宣讲会(详见下文),同学们不可错过。

summer-01

KubeEdge云原生边缘计算社区

KubeEdge[(https://github.com/kubeedge)]https://github.com/kubeedge)业界首个云原生边缘计算框架、云原生计算基金会内部唯一孵化级边缘计算开源项目 。KubeEdge 连接云原生和边缘计算生态,聚焦于提供一致的云边资源协同、数据协同、智能协同和应用协同体验,为边缘计算领域的应用提供更好的支持和解决方案,在全球已拥有 1500+ 贡献者和 100 贡献组织,在GitHub获得 7.3k+Stars2.1k+Forks

KubeEdge社区持续开拓创新,目前已完成业界最大规模云原生边云协同高速公路项目(统一管理10万边缘节点/50万边缘应用)、业界首个云原生星地协同卫星、业界首个云原生车云协同汽车、业界首个云原生油田项目,开源业界首个分布式协同AI框架Sedna及业界首个边云协同终身学习范式。

KubeEdge开源之夏2024课题

项目1:支持边缘节点上报event

  • 项目编号:2498a0328
  • 项目难度:进阶/Advanced
  • 导师联系:鲍玥 baoyue2@huawei.com
  • 项目简述:在目前的KubeEdge版本中,由于云边通道没有开发event相关接口,因此用户无法在云端获取到边缘pod的事件,尤其当pod状态异常时,用户必须要登录边缘节点获取pod事件,运维成本比较高。本项目希望能在云边通道增加event接口,支持边缘节点上报event,提高KubeEdge易用性与运维效率。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0328?lang=zh&list=pro

项目2:基于KubeEdge的移动自组织网络边缘计算架构设计与实现

  • 项目编号:2498a0330
  • 项目难度:进阶/Advanced
  • 导师联系:赖俊宇( Jason)laijy@uestc.edu.cn
  • 项目简述:边缘计算(Edge Computing)与移动自组织网络(MANET)的结合,在应急等场景下有广泛的需求和良好的前景。本项目拟基于业界最流行的云原生云边协同计算架构KubeEdge,设计和实现面向无人机/无人系统集群等典型MANET场景的边缘计算架构,以更好支持MANET中的“云-边”协同、“边-边”协同计算能力。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0330?lang=zh&list=pro

项目3:使用 KubeEdge 实现基于深度学习的设备故障检测场景

  • 项目编号:2498a0332
  • 项目难度:进阶/Advanced
  • 导师联系:张红兵(Hongbing) hongbing.zhang@daocloud.io
  • 项目简述:边缘计算作为人工智能的最后一公里,跟 AI 结合的应用场景也很广泛。在工业制造领域,边缘 AI 发挥着越来越重要的作用。场景:面向生产制造过程,刀具、冲压设备等声音检测,将老师傅听音多年经验迁移至算法模型,设备运行故障及时发现,提升设备巡检运维效率。1. 使用 KubeEdge 将故障检测模型应用下发至边缘节点,模型应用的资源消耗不超过4c8g;2. 运行模型应用,通过模拟modbus设备采集声音信号,模型应用能够通过设备声音识别出设备故障,控制边缘模拟灯泡的亮灭,并录制视频;3. (可选)将终端设备接入平台纳管。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0332?lang=zh&list=pro

项目4: Sedna 联合推理、联邦学习控制器优化

  • 项目编号:2498a0315
  • 项目难度:进阶/Advanced
  • 导师联系:唐明 ming.tang@daocloud.io
  • 项目简述:Sedna是在KubeEdge SIG AI中孵化的一个边云协同AI项目。得益于KubeEdge提供的边云协同能力,Sedna可以实现跨边云的协同训练和协同推理能力,如联合推理、增量学习、联邦学习、终身学习等。Sedna支持目前广泛使用的AI框架,如TensorFlow/Pytorch/PaddlePaddle/MindSpore等,现有AI类应用可以无缝迁移到Sedna, 快速实现边云协同的训练和推理,可在降低成本、提升模型性能、保护数据隐私等方面获得提升。但是当前 Sedna 项目中联合推理、联邦学习控制器依然存在一些功能缺陷需要解决,主要表现在以下方面:联合推理:1、在创建联合推理任务或联邦学习任务以后,其生成的云和边的任务实例在出现故障或手动删除以后不会自动重建,即缺少自愈能力;2、联合推理任务CR在被删除以后,其生成的任务实例以及service配置不会被级联删除,该缺陷会导致后续再次创建联合推理任务失败。需要做的事情:对当前Sedna的联合推理和联邦学习控制器进行优化以解决上述功能缺陷。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0315?lang=zh&list=pro

项目5:大语言模型边侧基准测试套件:基于KubeEdge-Ianvs实现

  • 项目编号:2498a0318
  • 项目难度:进阶
  • 导师联系:胡创 hchuchuang@gmail.com
  • 项目简述:由于模型尺寸和数据规模,LLMs往往在云端训练。同时由于大语言模型使用过程往往涉及商业机密或用户隐私,在边侧设备部署LLMs也逐渐成为了研究热点。LLMs量化技术正在使能LLMs边侧推理,然而,边侧设备的有限资源对云端训练LLMs的推理延迟和推理精度产生了影响。Ianvs旨在利用容器资源管理能力和边云协同能力对云端训练LLMs做边侧部署基准测试。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0318?lang=zh&list=pro

项目6:行业大模型基准测试套件:基于KubeEdge-Ianvs实现

  • 项目编号:2498a0319
  • 项目难度:进阶
  • 导师联系:郑子木 zimu.zheng@huawei.com
  • 项目简述:大模型进入规模化应用时代,云已为大模型提供基础设施和服务,相关客户进一步提出包括个性化、数据合规、实时性等边缘侧的针对性应用需求,而云边协同的人工智能服务成为大趋势。但是,当前在产品定义、服务质量、服务资质、行业影响力等方面,存在通用竞争力和客户信任问题两大挑战,其症结在于,当前大模型基准测试聚焦对通用基础能力的考核,未能从行业角度牵引大模型应用。本项目从大模型产业以及云边协同人工智能角度、藉由行业应用反映大模型真实价值,以行业基准测试牵引大模型应用孵化。本项目基于协同人工智能基准测试套件KubeEdge-Ianvs,补充大模型测试工具接口,配套测试数据集,并构建政务等行业大模型测试套件。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0319?lang=zh&list=pro

项目7:代码大模型基准测试套件:基于 KubeEdge-Ianvs 构建

  • 项目编号:2498a0323
  • 项目难度:进阶/Advanced
  • 导师联系:韩洋(Brooks) yangbrooks.han@gmail.com
  • 项目简述:大语言模型(LLMs) 在代码生成、自动编程、代码分析等任务中展现出了强大的能力。然而,这些模型通常基于通用的代码数据进行训练,无法充分利用软件工程师在实际工作中的协作和反馈。为了构建更加智能、高效的代码生态系统,有必要建立一个代码大模型数据集和评测基准,通过LLMs促进代码工程项目与软件工程师的紧密协作。本项目将基于开源的协同人工智能基准测试套件KubeEdge-Ianvs,构建一个面向LLMs的协作式代码智能体对齐数据集和评测基准。该数据集将包含软件工程师在开发过程中的行为轨迹、反馈和迭代过程,以及相关的代码版本和注释信息。通过这些数据,我们将设计评测指标和基准,以衡量LLMs在代码生成、推荐和分析等任务上的性能,并促进LLMs与软件工程师的协作。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0323?lang=zh&list=pro

项目8:大语言模型云边协同推理:基于KubeEdge-Ianvs实现

  • 项目编号:2498a0324
  • 项目难度:进阶/Advanced
  • 导师联系:胡时京 sjhu21@m.fudan.edu.cn
  • 项目简述:目前以Llama2-70b,Qwen-72b为首的百亿、千亿参数规模的LLM模型大多只能部署在算力充足的云端提供推理服务。然而对于边缘终端的用户来说,一方面云端LLM服务面临推理速度慢、响应时延长的问题,另一方面将边缘的隐私数据上传云端处理可能面临隐私泄露的风险。同时在边缘环境可以部署的LLM模型(如TinyLlama-1.1b)推理准确率相较云端LLM有较大差距。因此,单独使用云端LLM或是边缘LLM都无法同时兼顾隐私保护、推理实时性和推理准确率,所以我们需要通过云边协同的策略结合云端LLM推理准确率高和边缘LLM推理隐私性强、速度快的优势,从而更好满足边缘用户的需求。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0324?lang=zh&list=pro

项目9:多语言mapper支持

  • 项目编号:2498a0316
  • 项目难度:进阶/Advanced
  • 导师联系:刘家伟(jiawei) jiawei.liu@daocloud.io
  • 项目简述:所有的设备都可以通过厂商的驱动进行连接和控制,但是从设备拿到的信息需要转换成Kubeedge所理解的格式。Mapper就是Kubeedge和devices之间相互联系的应用程序。Mapper-framework 是一个框架,通过提供mapper运行时库和用于脚手架和代码生成的工具来生成新的mapper,使编写mapper变得更容易。目前社区有基于go语言实现的Mapper-framework,但其它语言(c、java、python)在实际业务中也有需求。需要做的事情:基于 (c、java、python)中至少一种语言实现。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0316?lang=zh&list=pro

项目10:KubeEdge边缘设备管理插件Mapper支持设备发现

  • 项目编号:2498a0331
  • 项目难度:进阶/Advanced
  • 导师联系:王彬丞 wangbincheng4@huawei.com
  • 项目简述:目前KubeEdge使用Mapper插件管理边缘设备,能够将边缘设备以设备孪生的形式纳管至KubeEdge集群中,以云原生的方式对边缘设备进行生命周期管理。目前Mapper管理边缘设备时,需要用户实现并提交设备CRD文件至KubeEdge集群,Mapper根据CRD文件中的定义连接并管理设备。但部分情况下设备支持自动发现,例如Onvif网络摄像头设备。本项目计划为边缘设备管理插件Mapper提供设备发现功能,能够让Mapper自动扫描发现设备,并将其纳管至KubeEdge集群,简化用户操作流程。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0331?lang=zh&list=pro

项目11:大语言模型智能体(LLM Agent)个性化研究:基于KubeEdge-Ianvs云边协同终身学习

  • 项目编号:2498a0333
  • 项目难度:进阶
  • 导师联系:杨步芳 bfyang@link.cuhk.edu.hk
  • 项目简述:大语言模型 (LLM)由于其卓越的推理能力和零样本能力受到广泛关注。其中,LLM Agent被视作LLM在物理世界中的一个重要落地方向。一个LLM Agent可以通过任务规划、工具调用、自我反思和任务执行,在物理世界中实现各种复杂的任务。本项目旨在通过利用云边协同框架,结合云端大模型的回答和边侧基于隐私数据生成的回答,实现个性化LLM Agent。我们计划基于KubeEdge-lanvs边云协同平台终身学习(知识库维护用户个性化的数据,终身学习本身可以支持不同边缘上有不同的模型)开发一个个性化LLM Agent。该系统能够结合云端大型LLM的泛化能力和边缘设备上的个性化用户数据,生成高质量、个性化的回答。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0333?lang=zh&list=pro

项目12:面向标注稀缺问题的联邦类增量学习研究:基于KubeEdge-Ianvs实现

  • 项目编号:2498a0334
  • 项目难度:进阶
  • 导师联系:陈浩锐 sechenhr@mail.scut.edu.cn
  • 项目简述:在边缘环境中,数据随时间不断到达边缘设备,其所包含的类别随时间不断增加。受制于赋予标记所需的成本,这些数据之中仅有少量数据带有标注。为了利用这些数据优化模型,可以通过联邦学习的方式在边缘设备间进行协作分布式模型训练。然而,传统的联邦学习仅考虑在数据不变的场景中进行有监督学习,无法在动态变化且标注稀缺的数据集上进行训练。本项目旨在充分利用不同边缘设备上标注稀缺的流式数据,通过联邦学习的方式对模型进行分布式训练,从而缓解模型在类增量学习场景中的遗忘程度,提升模型的泛化能力。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0334?lang=zh&list=pro

项目13:面向高移动场景的异构多边协同神经网络推理

  • 项目编号:2498a0335
  • 项目难度:进阶
  • 导师联系:李蕴哲 yunzhe.li@sjtu.edu.cn
  • 项目简述:在高速公路、高铁等高移动场景下,个人终端设备与基站等边缘设备连接不稳定,使得基于云的服务质量难以保证。然而,近几年,AI技术已经深入我们生活的方方面面,我们在高移动场景下也需要使用有高计算、存储需求且延迟敏感的AI技术,例如对话大模型等,这给边缘AI服务带来了新的挑战。本项目旨在利用边缘的多个异构计算单元(例如个人的手机、平板、手环、笔记本电脑等多个计算设备)进行协同的AI神经网络推理,使得AI任务可以利用更近的边缘设备以较低的延迟执行完毕,提高用户的使用体验。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0335?lang=zh&list=pro

项目14:批量节点接入

  • 项目编号:2498a0325
  • 项目难度:基础/Basic
  • 导师联系:侯玲玉(lingyu) lingyu.hou@daocloud.io
  • 项目简述:KubeEdge将Kubernetes的能力延伸到了边缘场景中,为云和边缘之间的网络,应用部署和元数据同步提供基础架构支持。在边缘场景中,边端节点可能处于私网中,无法从云端访问边端节点,因此需要从边端节点接入云端,反向建立双向通信链路。目前kubeedge只支持了单个节点接入,但是实际业务场景中,可能存在大量的边端节点,单个接入非常麻烦,所以需要支持批量接入节点。需要做的事情:支持批量接入节点,可以借助脚本或者其它方式实现 。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0325?lang=zh&list=pro

项目15:提供一个通用的 MQTT 协议

  • 项目编号:2498a0326
  • 项目难度:基础/Basic
  • 导师联系:方志颖(Zhiying) zhiying.fang@daocloud.io
  • 项目简述:在设备硬件市场中,MQTT协议是较为常见的设备协议。我们希望能有一个通用的MQTT Mapper来处理这些使用MQTT协议的设备,并且它能够支持常见的序列化方式(json、yaml 和 xml)中获取属性值。为了实现上述需求,我们需要您完成这些任务:1. 我们期望您使用最新的Mapper-Framework框架在 kubeedeg/mappers-go 项目中新增 MQTT 协议的Mapper;2. 我们期望这个Mapper能够从指定MQTT服务的Topic获取报文,并且能用常见序列化方式(json、xml)从报文中解析出属性值;3. (可选)我们期望您能提供一个更有扩展性的方案来从更多的自定义报文中解析属性值;
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0326?lang=zh&list=pro

项目16:边缘节点支持OTA升级

  • 项目编号:2498a0327
  • 项目难度:基础/Basic
  • 导师联系:胡炜 wei.hu@daocloud.io
  • 项目简述: 为了使边缘节点更为方便、迅速的得到升级,我们将一种远程升级方案OTA(Over-The-Air)引入到 KubeEdge 中,在OTA主要流程(制作升级包-> 下载升级包 -> 验签升级包 -> 固件更新)中,我们已经实现了大多步骤。我们发布版本会生成新的名为installation-package的镜像版本,然后通过NodeUpgradeJob CRD定义实现在边端节点获取镜像中的安装工具 keadm 执行升级命令升级边端节点。但在这个过程中如果黑客在节点中伪装镜像,这会导致 keadm 是不受信的,我们需要在keadm执行升级前,对镜像的摘要进行验证,也就是第三步验签升级包。并且在一些业务场景下(车联网、物联网)我们还需要提供一个可选项,使节点在等待收到一个有权限者确认后,再执行升级操作。为了实现上述需求,我们需要您完成这些任务:1. 我们期望您在边端节点升级前完成对升级镜像包摘要的验证;2. 我们期望您在NodeUpgradeJob CRD中新增一个参数,用于定义是否需要边端进行确认,如果需要,等待确认后再执行节点更新;3. 我们期望您在 MetaService 中提供确认边端节点升级的 AP I接口,并且在 keadm ctl 子命令中提供确认边端节点升级的命令操作;
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0327?lang=zh&list=pro

项目17:KubeEdge支持边缘节点离线场景下对数据面资源的操作

  • 项目编号:2498a0352
  • 项目难度:进阶/Advanced
  • 导师联系:杨志佳 2938893385@qq.com
  • 项目简述:边缘计算场景中,边缘节点常处于离线状态,用户需要在离线状态下查看本节点的数据面资源,比如pod,device,在某些场景下可能还需要对资源进行操作,比如重启pod,修改device instance等,同时在离线场景中开发一些资源操作的API供用户或上层应用。①在kubeedge1.17中将支持边缘节点离线时对pod的重启和状态查看,还需要进一步扩展离线状态下数据面操作的功能,比如对pod的logs/exec/describe ②离线状态下支持对device资源查看,device资源的修改,上线后与云端自动同步 ③提供离线状态下操作数据面资源的API,供上层应用使用 ④保证边缘节点从离线到在线后,边缘数据同步到云
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0352?lang=zh&list=pro

项目18:Windows非WSL虚拟化节点环境,改造mapper支持 Windows节点运行

  • 项目编号:2498a0428
  • 项目难度:进阶
  • 导师联系:吕涛涛(ttlv) steven.lv@nio.com
  • 项目简述:汽车试验台架,Windows的环境下,devops自动化流水线,不开启WSL虚拟化的Windows上位机环境,将边缘的Windows节点做为边缘设备纳管的同时,依托云端的device和deviceModel的CRD定义和edgecore的devicetwin以及evenbus模块,将边缘侧的mapper做为统一的业务处理模块,实现批量下发测试多业务场景的测试任务并且实时反馈测试结果的需求。
  • 项目链接https://summer-ospp.ac.cn/org/prodetail/2498a0428?lang=zh&list=pro

如何报名开源之夏课题?

summer-02

报名对象

  • 本活动面向年满 18 周岁的高校在校学生。
  • 暑期即将毕业的学生,只要申请时学生证处在有效期内,就可以报名活动。
  • 中国籍学生参与活动时需提供身份证、学生证、教育部学籍在线验证报告(学信网)或在读证明。
  • 外籍学生参与活动时需提供护照,同时提供录取通知书、学生卡、在读证明等文件用于证明学生身份。

报名时间

4月30日-6月4日 ,学生可在系统(https://summer-ospp.ac.cn/) 注册账号并填写个人资料,资料审核通过的学生可在系统提交项目申请书。注:个人资料应在06/03 15:00 UTC+8 前完成填写并提交审核,项目申请书应在06/04 18:00 UTC+8 前完成提交。

我可以在开源之夏获得什么?

  • 结识开源界小伙伴和技术大牛
  • 获得社区导师的专业指导,与开源项目开发者深度交流
  • 丰富项目实践经验,提升项目开发技能
  • 为学习方向提供参考,为职业发展积累人脉
  • 通过结项考核的学生将获得结项奖金和结项证书(基础难度税前8000元RMB,进阶难度税前12000元RMB),更有机会获选优秀学生

如何快速选定项目

对KubeEdge社区开源之夏课题感兴趣的同学,可以 通过本文上方导师邮箱,及时联系导师沟通锁定课题。为方便同学们更快了解与找到最适合自己的课题方向,KubeEdge社区将于 5月8日、5月9日特别组织18个课题线上宣讲会,大咖导师空降,为你娓娓道来,欢迎同学们通过以下方式参会:https://zoom.us/my/kubeedge

· 阅读需 15 分钟

北京时间2024年1月23日,KubeEdge发布1.16版本。新版本新增多个增强功能,在集群升级、集群易用性、边缘设备管理等方面均有大幅提升。

KubeEdge v1.16 新增特性:

新特性概览

集群升级:支持云边组件自动化升级

随着KubeEdge社区的持续发展,社区版本不断迭代;用户环境版本升级的诉求亟需解决。针对升级步骤难度大,边缘节点重复工作多的问题,v1.16.0版本的 KubeEdge 支持了云边组件的自动化升级。用户可以通过Keadm工具一键化升级云端,并且可以通过创建相应的Kubernetes API,批量升级边缘节点。

  • 云端升级

    云端升级指令使用了三级命令与边端升级进行了区分,指令提供了让用户使用更便捷的方式来对云端的KubeEdge组件进行升级。当前版本升级完成后会打印ConfigMap历史配置,如果用户手动修改过ConfigMap,用户可以选择通过历史配置信息来还原配置文件。我们可以通过help参数查看指令的指导信息:

    keadm upgrade cloud --help
    Upgrade the cloud components to the desired version, it uses helm to upgrade the installed release of cloudcore chart, which includes all the cloud components

    Usage:
    keadm upgrade cloud [flags]

    Flags:
    --advertise-address string Please set the same value as when you installed it, this value is only used to generate the configuration and does not regenerate the certificate. eg: 10.10.102.78,10.10.102.79
    -d, --dry-run Print the generated k8s resources on the stdout, not actual execute. Always use in debug mode
    --external-helm-root string Add external helm root path to keadm
    --force Forced upgrading the cloud components without waiting
    -h, --help help for cloud
    --kube-config string Use this key to update kube-config path, eg: $HOME/.kube/config (default "/root/.kube/config")
    --kubeedge-version string Use this key to set the upgrade image tag
    --print-final-values Print the final values configuration for debuging
    --profile string Sets profile on the command line. If '--values' is specified, this is ignored
    --reuse-values reuse the last release's values and merge in any overrides from the command line via --set and -f.
    --set stringArray Sets values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)
    --values stringArray specify values in a YAML file (can specify multiple)

    升级指令样例:

    keadm upgrade cloud --advertise-address=<init时设置的值> --kubeedge-version=v1.16.0
  • 边端升级

    v1.16.0版本的KubeEdge支持通过NodeUpgradeJob的Kubernetes API进行边缘节点的一键化、批量升级。API支持边缘节点的升级预检查、并发升级、失败阈值、超时处理等功能。对此,KubeEdge支持了云边任务框架。社区开发者将无需关注任务控制、状态上报等逻辑实现,只需聚焦云边任务功能本身。

    升级API样例:

    apiVersion: operations.kubeedge.io/v1alpha1
    kind: NodeUpgradeJob
    metadata:
    name: upgrade-example
    labels:
    description: upgrade-label
    spec:
    version: "v1.16.0"
    checkItems:
    - "cpu"
    - "mem"
    - "disk"
    failureTolerate: "0.3"
    concurrency: 2
    timeoutSeconds: 180
    labelSelector:
    matchLabels:
    "node-role.kubernetes.io/edge": ""
    node-role.kubernetes.io/agent: ""
  • 兼容测试

    KubeEdge社区提供了完备了版本兼容性测试,用户在升级时仅需要保证云边版本差异不超过2个版本,就可以避免升级期间云边版本不一致带来的问题。

更多信息可参考:

https://github.com/kubeedge/kubeedge/pull/5330 https://github.com/kubeedge/kubeedge/pull/5229 https://github.com/kubeedge/kubeedge/pull/5289

支持边缘节点的镜像预下载

新版本引入了镜像预下载新特性,用户可以通过ImagePrePullJob的Kubernetes API提前在边缘节点上加载镜像,该特性支持在批量边缘节点或节点组中预下载多个镜像,帮助减少加载镜像在应用部署或更新过程,尤其是大规模场景中,带来的失败率高、效率低下等问题。

镜像预下载API示例:

apiVersion: operations.kubeedge.io/v1alpha1
kind: ImagePrePullJob
metadata:
name: imageprepull-example
labels:
description:ImagePrePullLabel
spec:
imagePrePullTemplate:
images:
- image1
- image2
nodes:
- edgenode1
- edgenode2
checkItems:
- "disk"
failureTolerate: "0.3"
concurrency: 2
timeoutSeconds: 180
retryTimes: 1

更多信息可参考:

https://github.com/kubeedge/kubeedge/pull/5310 https://github.com/kubeedge/kubeedge/pull/5331

支持使用Keadm安装Windows边缘节点

KubeEdge 1.15版本实现了在Windows上运行边缘节点,在新版本中,我们支持使用安装工具Keadm直接安装Windows边缘节点,操作命令与Linux边缘节点相同,简化了边缘节点的安装步骤。

更多信息可参考:

https://github.com/kubeedge/kubeedge/pull/4968

增加多种容器运行时的兼容性测试

新版本中新增了多种容器运行时的兼容性测试,目前已集成了containerddockerisuladcri-o 4种主流容器运行时,保障KubeEdge版本发布质量,用户在安装容器运行时过程中也可以参考该PR中的适配安装脚本。

更多信息可参考:

https://github.com/kubeedge/kubeedge/pull/5321

EdgeApplication中支持更多Deployment对象字段的Override

在新版本中,我们扩展了EdgeApplication中的差异化配置项(overriders),主要的扩展有环境变量、命令参数和资源。当您不同区域的节点组环境需要链接不同的中间件时,就可以使用环境变量(env)或者命令参数(command, args)去重写中间件的链接信息。或者当您不同区域的节点资源不一致时,也可以使用资源配置(resources)去重写cpu和内存的配置。

更多信息可参考:

https://github.com/kubeedge/kubeedge/pull/5262 https://github.com/kubeedge/kubeedge/pull/5370

支持基于Mapper-Framework的Mapper升级

1.16版本中,基于Mapper开发框架Mapper-Framework构建了Mapper组件的升级能力。新框架生成的Mapper工程以依赖引用的方式导入原有Mapper-Framework的部分功能,在需要升级时,用户能够以升级依赖版本的方式完成,简化Mapper升级流程。

  • Mapper-Framework代码解耦:

    1.16版本中将Mapper-Framework中的代码解耦为用户层和业务层。用户层功能包括设备驱动及与之强相关的部分管理面数据面能力,仍会随Mapper-Framework生成在用户Mapper工程中,用户可根据实际情况修改。业务层功能包括Mapper向云端注册、云端下发Device列表等能力,会存放在kubeedge/mapper-framework子库中。

  • Mapper升级框架:

    1.16版本Mapper-Framework生成的用户Mapper工程通过依赖引用的方式使用kubeedge/mapper-framework子库中业务层功能,实现完整的设备管理功能。后续用户能够通过升级依赖版本的方式达到升级Mapper的目的,不再需要手动修改大范围代码。

更多信息可参考:

https://github.com/kubeedge/kubeedge/pull/5308 https://github.com/kubeedge/kubeedge/pull/5326

DMI数据面内置集成Redis与TDEngine数据库

1.16版本中进一步增强DMI数据面中向用户数据库推送数据的能力,增加Redis与TDengine数据库作为内置数据库。用户能够直接在device-instance配置文件中定义相关字段,实现Mapper自动向Redis与TDengine数据库推送设备数据的功能,相关数据库字段定义为:

type DBMethodRedis struct {
// RedisClientConfig of redis database
// +optional
RedisClientConfig *RedisClientConfig `json:"redisClientConfig,omitempty"`
}
type RedisClientConfig struct {
// Addr of Redis database
// +optional
Addr string `json:"addr,omitempty"`
// Db of Redis database
// +optional
DB int `json:"db,omitempty"`
// Poolsize of Redis database
// +optional
Poolsize int `json:"poolsize,omitempty"`
// MinIdleConns of Redis database
// +optional
MinIdleConns int `json:"minIdleConns,omitempty"`
}
type DBMethodTDEngine struct {
// tdengineClientConfig of tdengine database
// +optional
TDEngineClientConfig *TDEngineClientConfig `json:"TDEngineClientConfig,omitempty"`
}
type TDEngineClientConfig struct {
// addr of tdEngine database
// +optional
Addr string `json:"addr,omitempty"`
// dbname of tdEngine database
// +optional
DBName string `json:"dbName,omitempty"`
}

更多信息可参考:

https://github.com/kubeedge/kubeedge/pull/5064

基于Mapper-Framework的USB-Camera Mapper实现

基于KubeEdge的Mapper-Framework,新版本提供了USB-Camera的Mapper样例,该Mapper根据USB协议的Camera开发,用户可根据该样例和Mapper-Framework更轻松地开发具体业务相关的Mapper。

在样例中提供了helm chart包,用户可以通过修改usbmapper-chart/values.yaml部署UBS-Camera Mapper,主要添加USB-Camera的设备文件, nodeName, USB-Camera的副本数,其余配置修改可根据具体情况而定,通过样例目录中的Dockerfile制作Mapper镜像。

global:
replicaCounts:
......
cameraUsbMapper:
replicaCount: 2 #USB-Camera的副本数
namespace: default
......
nodeSelectorAndDevPath:
mapper:
- edgeNode: "edgenode02" #USB-Camera连接的缘节点nodeName
devPath: "/dev/video0" #USB-Camera的设备文件
- edgeNode: "edgenode1"
devPath: "/dev/video17"
......

USB-Camera Mapper的部署命令如下:

helm install usbmapper-chart ./usbmapper-chart

更多信息可参考:

https://github.com/kubeedge/mappers-go/pull/122

易用性提升:基于Keadm的部署能力增强

  • 添加云边通信协议配置参数

    在KubeEdge v1.16.0中,使用keadm join边缘节点时,支持使用--hub-protocol配置云边通信协议。目前KubeEdge支持websocket和quic两种通信协议,默认为websocket协议。

    命令示例:

    keadm join --cloudcore-ipport <云节点ip>:10001 --hub-protocol=quic --kubeedge-version=v1.16.0 --token=xxxxxxxx

    说明:当--hub-protocol设置为quic时,需要将--cloudcore-ipport的端口设置为10001,并需在CloudCore的ConfigMap中打开quic开关,即设置modules.quic.enable为true。

    操作示例:使用kubectl edit cm -n kubeedge cloudcore,将quic的enable属性设置成true,保存修改后重启CloudCore的pod。

    modules:
    ......
    quic:
    address: 0.0.0.0
    enable: true #quic协议开关
    maxIncomingStreams: 10000
    port: 10001

    更多信息可参考:

    https://github.com/kubeedge/kubeedge/pull/5156

  • keadm join与CNI插件解耦

    在新版本中,keadm join边缘节点时,不需要再提前安装CNI插件,已将边缘节点的部署与CNI插件解耦。同时该功能已同步到v1.12及更高版本,欢迎用户使用新版本或升级老版本。

    说明:如果部署在边缘节点上的应用程序需要使用容器网络,则在部署完edgecore后仍然需要安装CNI插件。

    更多信息可参考:

    https://github.com/kubeedge/kubeedge/pull/5196

升级K8s依赖到v1.27

新版本将依赖的Kubernetes版本升级到v1.27.7,您可以在云和边缘使用新版本的特性。

更多信息可参考:

https://github.com/kubeedge/kubeedge/pull/5121

版本升级注意事项

新版本我们使用DaemonSet来管理边端的MQTT服务Eclipse Mosquitto了,我们能够通过云端Helm Values配置来设置是否要开启MQTT服务。使用DaemonSet管理MQTT后,我们可以方便的对边端MQTT进行统一管理,比如我们可以通过修改DaemonSet的配置将边端MQTT替换成EMQX。

但是如果您是从老版本升级到最新版本,则需要考虑版本兼容问题,同时使用原本由静态Pod管理的MQTT和使用新的DaemonSet管理的MQTT会产生端口冲突。兼容操作步骤参考:

  1. 您可以在云端执行命令,将旧的边缘节点都打上自定义标签
kubectl label nodes --selector=node-role.kubernetes.io/edge without-mqtt-daemonset=""
  1. 您可以修改MQTT DaemonSet的节点亲和性
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- ...
- key: without-mqtt-daemonset
operator: Exists
  1. 将节点MQTT改为由DaemonSet管理
# ------ 边端 ------
# 修改/lib/systemd/system/edgecore.service,将环境变量DEPLOY_MQTT_CONTAINER设置成false
# 这步可以放在更新EdgeCore前修改,这样就不用重启EdgeCore了
sed -i '/DEPLOY_MQTT_CONTAINER=/s/true/false/' /etc/systemd/system/edgecore.service

# 停止EdgeCore
systemctl daemon-reload && systemctl stop edgecore

# 删除MQTT容器,Containerd可以使用nerdctl替换docker
docker ps -a | grep mqtt-kubeedge | awk '{print $1}' | xargs docker rm -f

# 启动EdgeCore
systemctl start edgecore

# ------ 云端 ------
# 删除节点标签
kubectl label nodes <NODE_NAME> without-mqtt-daemonset

新版本的keadm join命令会隐藏with-mqtt参数,并且将默认值设置成false,如果您还想使用静态Pod管理MQTT,您仍然可以设置参数--with-mqtt来使其生效。with-mqtt参数在v1.18版本中将会被移除。

· 阅读需 4 分钟

On Mar 7, 2022, KubeEdge released v1.10. The new version introduces several enhancements, significantly improving the installation experience, performance testing, network communication, and Kubernetes version compatibility.

v1.10 What's New

Release Highlights

Installation Experience Improvement with Keadm

Keadm adds some new sub-commands to improve the user experience, including containerized deployment, offline installation, etc. New sub-commands including: beta, config.

beta provides some sub-commands that are still in testing, but have complete functions and can be used in advance. Sub-commands including: beta init, beta manifest generate, beta join, beta reset.

  • beta init: CloudCore Helm Chart is integrated in beta init, which can be used to deploy containerized CloudCore.

  • beta join: Installing edgecore as system service from docker image, no need to download from github release.

  • beta reset: Reset the node, clean up the resources installed on the node by beta init or beta join. It will automatically detect the type of node to clean up.

  • beta manifest generate: Generate all the manifests to deploy the cloudside components.

config is used to configure kubeedge cluster, like cluster upgrade, API conversion, image preloading. Now the image preloading has supported, sub-commands including: config images list, config images pull.

  • config images list: List all images required for kubeedge installation.

  • config images pull: Pull all images required for kubeedge installation.

Refer to the links for more details. (#3517, #3540, #3554, #3534)

Preview version for Next-gen Edged: Suitable for more scenarios

A new version of the lightweight engine Edged, which is optimized from kubelet and integrated in edgecore, and occupies less resource. Users can customize lightweight optimization according to their needs.

Refer to the links for more details. (Dev-Branch for previewing: feature-new-edged)

Edgemark: Support large-scale KubeEdge cluster performance testing

Edgemark is a performance testing tool inherited from Kubemark. The primary use case of Edgemark is also scalability testing, it allows users to simulate edge clusters, which can be much bigger than the real ones.

Edgemark consists of two parts: real cloud part components and a set of "Hollow" Edge Nodes. In "Hollow" Edge Nodes, EdgeCore runs in container. The edged module runs with an injected mock CRI part that doesn't do anything. So the hollow edge node doesn't actually start any containers, and also doesn't mount any volumes.

Refer to the link for more details. (#3637)

EdgeMesh proxy tunnel supports quic

Users can choose edgemesh's proxy tunnel as quic protocol to transmit data. In edge scenarios, nodes are often in a weak network environment. Compared with the traditional tcp protocol, the quic protocol has better performance and QoS in the weak network environment.

Refer to the link for more details. (#281)

EdgeMesh supports proxy for udp applications

Some users' services use the udp protocol, and now edgemesh can also support the proxy of udp applications.

Refer to the link for more details. (#295)

EdgeMesh support SSH login between cloud-edge/edge-edge nodes

Edge nodes are generally distributed in the Private network environment, but it is often necessary to ssh login and operate the edge node. EdgeMesh provide a socks5proxy based on the tunnel inside EdgeMesh, which supports forwarding ssh requests from cloud/edge nodes to edge nodes.

Refer to the links for more details. (#258, #242)

Kubernetes Dependencies Upgrade

Upgrade the vendered kubernetes version to v1.22.6, users now can use the feature of new version on the cloud and on the edge side.

Refer to the link for more details. (#3624)

Important Steps before Upgrading

If you want to deploy the KubeEdge v1.10.0, please note that the Kubernetes dependency is 1.22.6.

Other Notable Changes

  • Remove dependency on os/exec and curl in favor of net/http (#3409, @mjlshen)

  • Optimize script when create stream cert (#3412, @gujun4990)

  • Cloudhub: prevent dropping volume messages (#3457, @moolen)

  • Modify the log view command after edgecore is running (#3456, @zc2638)

  • Optimize the iptables manager (#3461, @zhu733756)

  • Add script for build release (#3467, @gy95)

  • Using lateset codes to do keadm_e2e (#3469, @gy95)

  • Change the resourceType of msg issued by synccontroller (#3496, @Rachel-Shao)

  • Add a basic image for building various components of KubeEdge (#3513, @zc2638)

  • Supporting crossbuild all components (#3515, [@fisher

· 阅读需 3 分钟

The KubeEdge community is thrilled to announce the release of KubeEdge v1.12! This release introduces several exciting new features and enhancements, including alpha implementation of the next-generation Cloud Native Device Management Interface (DMI), a new version of the lightweight Edged engine, high-availability mode for EdgeMesh, edge node upgrades from the cloud, authorization for the Edge Kube-API endpoint, and more.

What's New in KubeEdge v1.12

Alpha Implementation of Next-Gen Cloud Native Device Management Interface (DMI)

DMI makes KubeEdge's IoT device management more pluggable and modular in a cloud-native way, covering Device Lifecycle Management, Device Operation, and Device Data Management.

  • Device Lifecycle Management: Simplifies IoT device lifecycle management, making it as easy as managing a pod.

  • Device Operation: Provides the ability to operate devices through the Kubernetes API.

  • Device Data Management: Separates device data management from device management, allowing data to be consumed by local applications or synchronized to the cloud through a special tunnel.

Next-Gen Edged Graduates to GA: Suitable for More Scenarios

The new version of the lightweight Edged engine, optimized from Kubelet and integrated into EdgeCore, has graduated to General Availability (GA) in this release. The new Edged will continue to communicate with the cloud through a reliable transmission tunnel, making it suitable for a wider range of scenarios.

Introducing High-Availability Mode for EdgeMesh

KubeEdge v1.12 introduces a high-availability mode for EdgeMesh. Unlike the previous centralized relay mode, the EdgeMesh HA mode can set up multiple relay nodes. When some relay nodes fail, other relay nodes can continue to provide relay services, avoiding single points of failure and improving system stability.

Support Edge Node Upgrade from the Cloud

KubeEdge v1.12 introduces the NodeUpgradeJob v1alpha1 API to upgrade edge nodes from the cloud. With this API and its associated controller, users can upgrade selected edge nodes from the cloud and roll back to the original version if the upgrade fails.

Support Authorization for Edge Kube-API Endpoint

Authorization for the Edge Kube-API Endpoint is now available in KubeEdge v1.12. Third-party plugins and applications that depend on Kubernetes APIs on edge nodes must use a bearer token to communicate with the kube-apiserver via the HTTPS server in MetaServer.

New GigE Mapper

KubeEdge v1.12 includes a new GigE Device Mapper with a Golang implementation, which is used to access GigE Vision protocol cameras.

Important Steps Before Upgrading

  • If you want to upgrade KubeEdge to v1.12, the configuration file in EdgeCore has been upgraded to v1alpha2. You must modify your configuration file for Edged in EdgeCore to adapt to the new Edged.

  • If you want to use authorization for the Edge Kube-API Endpoint, please enable the RequireAuthorization feature through the feature gate in both CloudCore and EdgeCore. If the RequireAuthorization feature is enabled, MetaServer will only serve HTTPS requests.

  • If you want to upgrade EdgeMesh to v1.12, you do not need to deploy the existing EdgeMesh-server, but you need to configure relayNodes.

  • If you want to run EdgeMesh v1.12 on KubeEdge v1.12 and use HTTPS requests to communicate with KubeEdge, you must set kubeAPIConfig.metaServer.security.enable=true.

KubeEdge v1.12 brings exciting new features and improvements to the edge computing ecosystem. We invite you to explore the release and provide feedback to the community. Happy edge computing!