Introduction:
In today’s blog, we will explore another device management tool, KubeEdge, and its components. So, what exactly is KubeEdge? KubeEdge is a tool used to run containerized applications on edge nodes. It operates within the realm of Edge Computing, where business logic is executed at the edge before being sent to the main or master server. Built upon Kubernetes, KubeEdge provides essential infrastructure support for networking, application deployment, and metadata synchronization between the cloud and the edge.
KubeEdge comprises two components: the Cloud part and the Edge part. Let’s delve into each of them:
(i) Cloud Part:
In KubeEdge, the Cloud part is referred to as CloudCore. It is responsible for managing applications running on the edge. Analogous to the control plane in Kubernetes, CloudCore oversees tasks such as pod management, scheduling, and other administrative functions.
(ii) Edge Part:
The Edge part, or EdgeCore, is responsible for executing applications and transmitting their outcomes to CloudCore.
To elucidate these concepts, let’s consider an example:
Imagine an IoT-based application tasked with monitoring room temperature and adjusting the air conditioning (AC) accordingly. The device also sends information to the master node for further processing. You may wonder why we need two devices instead of relying solely on the master node. The answer is straightforward: by distributing workload to edge nodes, we alleviate response time, reduce latency, and distribute the load, thus enhancing overall system efficiency.
KubeEdge Components
We have different components used on both Cloudcore and edgecore that are given below
1. Cloudcore Components
So Cloudcore is responsible for communicating with the Kube API server and to communicate with EdgeCore. Below are the listed components for Cloudcore
(i) Edge Controller: It is an extended Kubernetes controller that manages edge nodes and pod metadata so that the data can be targeted to a specific edge node. It also sync node/pod status between edge and Kubernetes api-server.
(ii) Device Controller: Device Controller is responsible for syncing metadata and status between Cloudcore and Edgecore.
(iii) CloudHub: A web socket server responsible for watching changes at the cloud side, caching and sending messages to EdgeHub.
2. EdgeCore Component
EdgeCore is responsible for actually running the application in the form of a pod.
(i) EdgeHub: A WebSocket client responsible for establishing and maintaining communication between edge nodes and the cloud service. It facilitates the synchronization of cloud-side resource updates to the edge and reports edge-side host and device status changes to the cloud, ensuring real-time data exchange and coordination.
(ii) MetaManager: Acts as the intermediary message processor between the edged and EdgeHub components. It manages the processing of messages exchanged between edge nodes and the cloud, as well as storing and retrieving metadata to and from a lightweight database (SQLite), ensuring efficient and reliable metadata management.
(iii) DeviceTwin: Manages the storage of device status information and synchronizes device status updates to the cloud. It provides query interfaces for applications to retrieve device status information, enabling seamless integration and interaction with edge devices.
(iv) ServiceBus: An HTTP client component responsible for interacting with HTTP servers (REST) from cloud-based components. It offers HTTP client capabilities to cloud components, allowing them to reach and communicate with HTTP servers running at the edge, facilitating data exchange and interoperability between cloud and edge environments.
(v) Edged: An agent deployed on edge nodes, responsible for managing containerized applications. It oversees the lifecycle of edge applications, including deployment, scaling, and monitoring, ensuring reliable execution and management of containerized workloads at the edge.
(vi) EventBus: An MQTT client component responsible for interacting with MQTT servers (such as Mosquitto). It provides publish and subscribe capabilities to other components, enabling efficient and reliable message communication and event-driven processing between cloud and edge components.
Conclusion
This is just the basic overview of KubeEdge and its components. In the upcoming blogs, we will demonstrate how to set up KubeEdge between two devices and showcase its functionality in action.
