By Andy Shi.
Gartner defines edge computing as a topology where information processing and content collection and delivery are placed closer to the sources of the information, with the idea that keeping traffic local and distributed will reduce latency. This includes all the technology on the Internet of Things (IoT).
A typical Kubernetes cluster sits in well-protected data centers. But when moving the nodes to the edge, the harsh reality of unstable public internet kicks in. By current upstream design, the Kubelet on each node will cache information in memory. This is fine if the connection is guaranteed. However, when the connections are not available, this design can lead to trouble. To be more specific, there are three typical scenarios that need to be taken into account.
In the Gartner edge computing report, it also points to the imperatives to be addressed, and one of them is: "A need for limited autonomy or disconnected operation."
OpenYurt (Yurt: /jɝːt/, portable, round tent) is an open source project to extend native Kubernetes to the edge. OpenYurt has several features outstanding and limited autonomy is a major one. So, how does OpenYurt solve these problems?
YurtHub is a node daemon that serves as a proxy for the outbound traffic from the Kubernetes node to the master nodes. When relaying outbound traffic, it will cache all the states and persist them locally. If the connection to the data center is lost or the Kubelet restarts, the Kubelet will read from the cache of YurtHub. This will effectively solve problem A. For problem C, it still relies on the Yurthub. Since the users manage the workloads through API server, the master nodes hold the truth. When the connection resumes, YurtHub sync the edge nodes with the Masters. This way your pods will get the latest updates from the master.
This design has a couple advantages:
Of course, there are other solutions. One of them, for example, will create its own agent based on a forked version of Kubelt and basically embed the caching mechanism inside it. While this approach appears to be simpler in implementation, it does add tremendous maintenance cost as the forked Kubelet has to keep up with the upstream version changes if the agent wants to retain the API compatibility.
How about problem B? OpenYurt provides a controller manager which manages a few controllers such as the node controller and the unit controller for different edge computing use cases. And one of the functionalities is the Pods in the nodes that are in the autonomy mode will not be evicted from API Server even if the node heartbeats are missing.
As you can see, the first three challenges of limited autonomy can be easily and elegantly solved with OpenYurt. How about the last one? We are still working on that. If you are interested, please join us. Here is our git repo.
Getting Started with Kubernetes | Kubernetes CNIs and CNI Plug-ins
508 posts | 49 followers
FollowAlibaba Cloud Native Community - May 4, 2023
Alibaba Developer - January 11, 2021
Alibaba Container Service - October 30, 2024
Alibaba Developer - January 21, 2021
Alibaba Cloud Native Community - July 17, 2023
Alibaba Container Service - November 7, 2024
508 posts | 49 followers
FollowAlibaba Cloud Container Service for Kubernetes is a fully managed cloud container management service that supports native Kubernetes and integrates with other Alibaba Cloud products.
Learn MoreProvides a control plane to allow users to manage Kubernetes clusters that run based on different infrastructure resources
Learn MoreLink IoT Edge allows for the management of millions of edge nodes by extending the capabilities of the cloud, thus providing users with services at the nearest location.
Learn MoreAccelerate and secure the development, deployment, and management of containerized applications cost-effectively.
Learn MoreMore Posts by Alibaba Cloud Native Community