如何在 Kubernetes (Preview) 上安裝 IoT EdgeHow to install IoT Edge on Kubernetes (Preview)

適用于: 是圖示 IoT Edge 1。1Applies to: yes icon IoT Edge 1.1

IoT Edge 可以使用它來與 Kubernetes 整合,以作為具復原性、高可用性的基礎結構層。IoT Edge can integrate with Kubernetes using it as a resilient, highly available infrastructure layer. 以下是這項支援在高階 IoT Edge 解決方案中的適合位置:Here is where this support fits in a high level IoT Edge solution:

k8s 簡介

提示

這項整合的好精神模型是將 Kubernetes 視為另一個作業環境,IoT Edge 應用程式除了 Linux 和 Windows 之外還可以執行。A good mental model for this integration is to think of Kubernetes as another operating environment IoT Edge applications can run on in addition to Linux and Windows.

架構Architecture

在 Kubernetes 上,IoT Edge 為 Edge 工作負載部署 (.CRD) 提供 自訂資源定義On Kubernetes, IoT Edge provides Custom Resource Definition (CRD) for edge workload deployments. IoT Edge 代理程式會假設 .crd 控制器 的角色會協調受雲端管理的預期狀態與本機叢集狀態。IoT Edge Agent assumes the role of a CRD controller that reconciles cloud-managed desired state with the local cluster state.

模組存留期是由 Kubernetes 排程器所管理,可維持模組可用性並選擇其放置。Module lifetime is managed by the Kubernetes scheduler, which maintains module availability and chooses their placement. IoT Edge 會管理在頂端執行的 Edge 應用程式平臺,並持續協調 IoT 中樞內所指定的所需狀態與 Edge 叢集上的狀態。IoT Edge manages the edge application platform running on top, continuously reconciling the desired state specified in IoT Hub with the state on the edge cluster. 應用程式模型仍是以 IoT Edge 模組和路由為基礎的熟悉模型。The application model is still the familiar model based on IoT Edge modules and routes. IoT Edge Agent 控制器會對 Kubernetes 原生結構(例如 pod、部署、服務等)執行 自動 轉譯 IoT Edge 的應用程式模型。The IoT Edge Agent controller performs automatic translation IoT Edge's application model to the Kubernetes native constructs like pods, deployments, services etc.

以下是高層級架構圖:Here is a high-level architecture diagram:

kubernetes 架構

Edge 部署的每個元件的範圍是裝置專屬的 Kubernetes 命名空間,因此可以在多個邊緣裝置和其部署之間共用相同的叢集資源。Every component of the edge deployment is scoped to a Kubernetes namespace specific to the device, making it possible to share the same cluster resources among multiple edge devices and their deployments.

注意

Kubernetes 上的 IoT Edge 目前為 公開預覽狀態。IoT Edge on Kubernetes is in public preview.

教學課程和參考Tutorials and references

如需詳細資訊,請參閱 Kubernetes preview 檔迷你網站上的 IoT Edge ,包括深入的教學課程和參考。Please see the IoT Edge on Kubernetes preview docs mini-site for more information, including in-depth tutorials and references.