Convert Figma logo to code with AI

kubeedge logokubeedge

Kubernetes Native Edge Computing Framework (project under CNCF)

6,652
1,712
6,652
718

Top Related Projects

109,710

Production-Grade Container Scheduling and Management

27,519

Lightweight Kubernetes

1,453

The IoT Edge OSS project

OpenYurt - Extending your native Kubernetes to edge(project under CNCF)

Quick Overview

KubeEdge is an open-source system for extending native containerized application orchestration capabilities to hosts at Edge. It is built upon Kubernetes and provides fundamental infrastructure support for network, application deployment, and metadata synchronization between cloud and edge.

Pros

  • Seamless integration with Kubernetes, allowing for consistent application deployment across cloud and edge
  • Supports offline edge node autonomy, enabling continued operation even when disconnected from the cloud
  • Lightweight and minimalistic design, suitable for resource-constrained edge devices
  • Provides device management and IoT protocols support out of the box

Cons

  • Relatively complex setup and configuration process compared to standard Kubernetes
  • Limited community support and ecosystem compared to more established cloud-native projects
  • Potential performance overhead due to the additional layer of abstraction
  • May require specialized knowledge of both Kubernetes and edge computing concepts

Getting Started

To get started with KubeEdge, follow these steps:

  1. Install Kubernetes on your cloud server
  2. Install KubeEdge cloud components:
wget https://github.com/kubeedge/kubeedge/releases/download/v1.12.1/keadm-v1.12.1-linux-amd64.tar.gz
tar xzvf keadm-v1.12.1-linux-amd64.tar.gz
sudo ./keadm init
  1. Join edge nodes:
wget https://github.com/kubeedge/kubeedge/releases/download/v1.12.1/keadm-v1.12.1-linux-amd64.tar.gz
tar xzvf keadm-v1.12.1-linux-amd64.tar.gz
sudo ./keadm join --cloudcore-ipport=<cloudcore-ip>:10000 --token=<token>
  1. Deploy applications using standard Kubernetes manifests:
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 2
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80

For more detailed instructions and advanced configurations, refer to the official KubeEdge documentation.

Competitor Comparisons

109,710

Production-Grade Container Scheduling and Management

Pros of Kubernetes

  • Mature and widely adopted container orchestration platform
  • Extensive ecosystem with numerous tools and integrations
  • Robust community support and documentation

Cons of Kubernetes

  • Complex setup and management, especially for edge computing scenarios
  • Higher resource requirements, not optimized for resource-constrained devices
  • Centralized architecture may introduce latency for edge deployments

Code Comparison

KubeEdge:

apiVersion: devices.kubeedge.io/v1alpha2
kind: Device
metadata:
  name: temperature-sensor
spec:
  deviceModelRef:
    name: temperature-sensor-model

Kubernetes:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx

KubeEdge extends Kubernetes with edge-specific features, focusing on lightweight edge computing. It provides a seamless connection between cloud and edge, enabling efficient management of edge devices and applications. KubeEdge is designed to work in resource-constrained environments and offers better support for edge-specific use cases.

Kubernetes, on the other hand, is a more general-purpose container orchestration platform, primarily designed for cloud and data center environments. It offers a wider range of features and flexibility but may be overkill for edge computing scenarios.

27,519

Lightweight Kubernetes

Pros of k3s

  • Lightweight and easy to install, ideal for edge computing and IoT devices
  • Single binary distribution, reducing complexity and resource requirements
  • Supports ARM64 and ARMv7, making it suitable for a wide range of hardware

Cons of k3s

  • Limited to Kubernetes-native edge computing scenarios
  • May not be as flexible for complex edge computing architectures
  • Lacks some advanced features found in full Kubernetes distributions

Code Comparison

k3s:

apiVersion: k3s.io/v1alpha1
kind: HelmChart
metadata:
  name: traefik
  namespace: kube-system
spec:
  chart: traefik
  repo: https://helm.traefik.io/traefik

KubeEdge:

apiVersion: devices.kubeedge.io/v1alpha2
kind: DeviceModel
metadata:
  name: sensor-tag-model
  namespace: default
spec:
  properties:
    - name: temperature
      description: temperature in degree celsius
      type:
        int:
          accessMode: ReadOnly
          maximum: 100
          minimum: -50

KubeEdge focuses on extending Kubernetes to edge devices, offering more comprehensive edge computing capabilities, while k3s is a lightweight Kubernetes distribution suitable for resource-constrained environments. KubeEdge provides better support for device management and edge-cloud synergy, whereas k3s excels in simplicity and ease of deployment for basic Kubernetes workloads at the edge.

1,453

The IoT Edge OSS project

Pros of IoT Edge

  • Tighter integration with Azure cloud services and ecosystem
  • Simpler setup and management for Azure-centric deployments
  • More extensive documentation and support resources

Cons of IoT Edge

  • Limited to Azure cloud, less flexible for multi-cloud or hybrid scenarios
  • Potentially higher costs due to Azure-specific services and licensing
  • Less customizable compared to the open-source nature of KubeEdge

Code Comparison

KubeEdge example (Go):

func (e *edgeController) syncPod(key string) error {
    namespace, name, err := cache.SplitMetaNamespaceKey(key)
    if err != nil {
        return err
    }
    pod, err := e.podLister.Pods(namespace).Get(name)
    if err != nil {
        if errors.IsNotFound(err) {
            return nil
        }
        return err
    }
    // ... (additional logic)
}

IoT Edge example (C#):

public async Task<ModuleClient> InitializeModuleClientAsync()
{
    MqttTransportSettings mqttSetting = new MqttTransportSettings(TransportType.Mqtt_Tcp_Only);
    ITransportSettings[] settings = { mqttSetting };
    ModuleClient moduleClient = await ModuleClient.CreateFromEnvironmentAsync(settings);
    await moduleClient.OpenAsync();
    return moduleClient;
}

Both projects aim to extend cloud capabilities to edge devices, but KubeEdge focuses on Kubernetes-based deployments, while IoT Edge is tailored for Azure environments. KubeEdge offers more flexibility and customization, while IoT Edge provides seamless integration with Azure services.

OpenYurt - Extending your native Kubernetes to edge(project under CNCF)

Pros of OpenYurt

  • Simpler architecture and easier to deploy for edge computing scenarios
  • Better support for autonomy of edge nodes during network disconnections
  • More flexible node management with node pools and labels

Cons of OpenYurt

  • Less mature project with fewer contributors and community support
  • Limited support for heterogeneous hardware compared to KubeEdge
  • Fewer built-in features for edge-specific use cases (e.g., device management)

Code Comparison

KubeEdge configuration example:

apiVersion: cloudcore.config.kubeedge.io/v1alpha1
kind: CloudCore
cloudHub:
  advertiseAddress:
    - 10.10.102.78
  nodeLimit: 100

OpenYurt configuration example:

apiVersion: apps.openyurt.io/v1alpha1
kind: YurtAppSet
spec:
  workloadTemplate:
    deploymentTemplate:
      metadata:
        labels:
          app: nginx
      spec:
        replicas: 2

Both projects aim to extend Kubernetes to edge computing scenarios, but they take different approaches. KubeEdge offers a more comprehensive solution with additional features for edge computing, while OpenYurt focuses on simplicity and autonomy for edge nodes. The choice between them depends on specific use case requirements and the level of edge computing complexity needed.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

KubeEdge

Go Report Card LICENSE Releases CII Best Practices

English | 简体中文

KubeEdge is built upon Kubernetes and extends native containerized application orchestration and device management to hosts at the Edge. It consists of cloud part and edge part, provides core infrastructure support for networking, application deployment and metadata synchronization between cloud and edge. It also supports MQTT which enables edge devices to access through edge nodes.

With KubeEdge it is easy to get and deploy existing complicated machine learning, image recognition, event processing and other high level applications to the Edge. With business logic running at the Edge, much larger volumes of data can be secured & processed locally where the data is produced. With data processed at the Edge, the responsiveness is increased dramatically and data privacy is protected.

KubeEdge is an incubation-level hosted project by the Cloud Native Computing Foundation (CNCF). KubeEdge incubation announcement by CNCF.

Advantages

  • Kubernetes-native support: Managing edge applications and edge devices in the cloud with fully compatible Kubernetes APIs.
  • Cloud-Edge Reliable Collaboration: Ensure reliable messages delivery without loss over unstable cloud-edge network.
  • Edge Autonomy: Ensure edge nodes run autonomously and the applications in edge run normally, when the cloud-edge network is unstable or edge is offline and restarted.
  • Edge Devices Management: Managing edge devices through Kubernetes native APIs implemented by CRD.
  • Extremely Lightweight Edge Agent: Extremely lightweight Edge Agent(EdgeCore) to run on resource constrained edge.

How It Works

KubeEdge consists of cloud part and edge part.

Architecture

In the Cloud

  • CloudHub: a web socket server responsible for watching changes at the cloud side, caching and sending messages to EdgeHub.
  • EdgeController: an extended kubernetes controller which manages edge nodes and pods metadata so that the data can be targeted to a specific edge node.
  • DeviceController: an extended kubernetes controller which manages devices so that the device metadata/status data can be synced between edge and cloud.

On the Edge

  • EdgeHub: a web socket client responsible for interacting with Cloud Service for the edge computing (like Edge Controller as in the KubeEdge Architecture). This includes syncing cloud-side resource updates to the edge, and reporting edge-side host and device status changes to the cloud.
  • Edged: an agent that runs on edge nodes and manages containerized applications.
  • EventBus: a MQTT client to interact with MQTT servers (mosquitto), offering publish and subscribe capabilities to other components.
  • ServiceBus: an HTTP client to interact with HTTP servers (REST), offering HTTP client capabilities to components of cloud to reach HTTP servers running at edge.
  • DeviceTwin: responsible for storing device status and syncing device status to the cloud. It also provides query interfaces for applications.
  • MetaManager: the message processor between edged and edgehub. It is also responsible for storing/retrieving metadata to/from a lightweight database (SQLite).

Kubernetes compatibility

Kubernetes 1.20Kubernetes 1.21Kubernetes 1.22Kubernetes 1.23Kubernetes 1.24Kubernetes 1.25Kubernetes 1.26Kubernetes 1.27Kubernetes 1.28Kubernetes 1.29
KubeEdge 1.12✓✓✓-------
KubeEdge 1.13+✓✓✓------
KubeEdge 1.14++✓✓✓-----
KubeEdge 1.15++++✓✓✓---
KubeEdge 1.16+++++✓✓✓--
KubeEdge 1.17++++++✓✓✓-
KubeEdge HEAD (master)+++++++✓✓✓

Key:

  • ✓ KubeEdge and the Kubernetes version are exactly compatible.
  • + KubeEdge has features or API objects that may not be present in the Kubernetes version.
  • - The Kubernetes version has features or API objects that KubeEdge can't use.

Guides

Get start with this doc.

See our documentation on kubeedge.io for more details.

To learn deeply about KubeEdge, try some examples on examples.

Roadmap

Meeting

Regular Community Meeting:

Resources:

Contact

If you need support, start with the troubleshooting guide, and work your way through the process that we've outlined.

If you have questions, feel free to reach out to us in the following ways:

Contributing

If you're interested in being a contributor and want to get involved in developing the KubeEdge code, please see CONTRIBUTING for details on submitting patches and the contribution workflow.

Security

Security Audit

A third party security audit of KubeEdge has been completed in July 2022. Additionally, the KubeEdge community completed an overall system security analysis of KubeEdge. The detailed reports are as follows.

Reporting security vulnerabilities

We encourage security researchers, industry organizations and users to proactively report suspected vulnerabilities to our security team (cncf-kubeedge-security@lists.cncf.io), the team will help diagnose the severity of the issue and determine how to address the issue as soon as possible.

For further details please see Security Policy for our security process and how to report vulnerabilities.

License

KubeEdge is under the Apache 2.0 license. See the LICENSE file for details.