Kubernetes Native Edge Computing Framework (project under CNCF)

Overview

KubeEdge

Build Status Go Report Card LICENSE Releases Documentation Status

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.

Note:

The versions before 1.3 have not been supported, please try upgrade.

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: a 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.13 Kubernetes 1.14 Kubernetes 1.15 Kubernetes 1.16 Kubernetes 1.17 Kubernetes 1.18 Kubernetes 1.19
KubeEdge 1.3
KubeEdge 1.4
KubeEdge 1.5
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.

License

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

Issues
  • Metrics-Sever on KubeEdge (configuration process and vague document)

    Metrics-Sever on KubeEdge (configuration process and vague document)

    What happened:

    1. I cannot find the certgen.sh in the folder /etc/kubeedge/, and I found it in the original git clone folder in $GOPATH/src/github.com/kubeedge/kubeedge/build/tools/certgen.sh. Are they the same file or not? (Doc section 4.4.3 "third" step certification part for cloud core.)

    2. I have no idea how to activate cloudStream and edgeStream. In the document, it is said that I could modify cloudcore.yaml or edgecore.yaml. However, in the last sentence, it mentioned that we need to set both cloudStream and edgeStream to true!! (Doc section 4.4.3 "fifth" step cloudStream and edgeStream setting)

    3. I only found the edgecore service with the help of @GsssC (Doc section 4.4.3 "sixth" step for restarting cloudcore and edgecore.) However, I still cannot find a way to restart cloudcore. I cannot even find any services no matter which is activated or not related to KubeEdge service (cloudcore) by using this command sudo systemctl list-units --all. By the way, I used this command to restart edgecore: systemctl restart edgecore, and I found out that the kube-proxy containers may cause the problem. Also, I tried to use this command to restart cloudcore: cloudcore restart, though I am not sure if this is the right command or not.

    4. If the KubeEdge supports the CNI plugin or not? (@daixiang0 said that CNI plugin is not supported right now, but @GsssC said that it is supported.) I am using the weave-net plugin as my CNI plugin since I heard that it has good support for ARM CPU architecture. (Edge node is raspberry pi 4 or NVIDIA Jetson TX2(future)) If the answer is yes, could you please help me with the configuration issues. In k8s_weave-npc container, it said that unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined In k8s_weave container, it said that [kube-peers] Could not get cluster config: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined Failed to get peers

    5. kubectl top nodes cannot get any KubeEdge edge node metrics. image

    What you expected to happen:

    1. Get the certgen.sh for certificates generation.

    2. Specified YAML file I do need to modify. (cloudcore.yaml or edgecore.yaml or both?)

    3. There is a command to restart cloudcore.

    4. No terminated error status on weave-net pod anymore.

    5. I can see metrics like other Kubernetes nodes.

    6. I can see metrics on Kubernetes Dashboard, Grafana, and Prometheus.

    How to reproduce it (as minimally and precisely as possible):

    1. construct a KubeEdge cluster (1 master node, 1 worker node(k8s), 1 edge node(KubeEdge))
    2. deploy Kubernetes Dashboard by Dan Wahlin GitHub scripts https://github.com/DanWahlin/DockerAndKubernetesCourseCode/tree/master/samples/dashboard-security
    3. deploy Grafana, Prometheus, kube-state-metrics, metrics-server by Dan Wahlin GitHub scripts https://github.com/DanWahlin/DockerAndKubernetesCourseCode/tree/master/samples/prometheus

    Anything else we need to know?: Document: https://docs.kubeedge.io/_/downloads/en/latest/pdf/ (section 4.4.3 - kubectl logs) (section 4.4.4 - metrics-server) Weave-Net Pod --> contaienrs logs in RPI4 image image Grafana, Prometheus, metrics-server, kube-state-metrics scripts: https://github.com/DanWahlin/DockerAndKubernetesCourseCode/tree/master/samples/prometheus

    Environment:

    • KubeEdge version(e.g. cloudcore/edgecore --version):

    cloudcore: image image

    edgecore: edgecore --version: command not found image

    CloudSide Environment:

    • Hardware configuration (e.g. lscpu): [email protected]:/home/charlie# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 6 On-line CPU(s) list: 0-5 Thread(s) per core: 1 Core(s) per socket: 6 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 158 Model name: Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz Stepping: 10 CPU MHz: 800.071 CPU max MHz: 4100.0000 CPU min MHz: 800.0000 BogoMIPS: 6000.00 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 9216K NUMA node0 CPU(s): 0-5 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d

    • OS (e.g. cat /etc/os-release): image

    • Kernel (e.g. uname -a): image

    • Go version (e.g. go version): image

    • Others:

    EdgeSide Environment:

    • edgecore version (e.g. edgecore --version): command not found image

    • Hardware configuration (e.g. lscpu): image

    • OS (e.g. cat /etc/os-release): image

    • Kernel (e.g. uname -a): image

    • Go version (e.g. go version): image

    • Others:

    @GsssC Hi, I finally submitted an issue! Could you please give me a hand? Thank you very much in advance!

    kind/bug 
    opened by s099064146 74
  • How to deploy the edge part into a k8s cluster

    How to deploy the edge part into a k8s cluster

    Which jobs are failing: I tried to deploy edgecore according to the documentation, but it didn't work.

    Which test(s) are failing: I tried to deploy edgecore according to the document. When I finished, the edge node is still in the state of NotReady. If I see the pods, I can see that the pod containing edgecore is in the pending state.

    Just think about the following (my edgenode's name is "172.31.23.166")

    $ kubectl get nodes
    NAME               STATUS     ROLES    AGE   VERSION
    172.31.23.166      NotReady   <none>   15s
    ip-172-31-27-157   Ready      master   17h   v1.14.1
    
    $ kubectl get pods -n kubeedge
    NAME                              READY   STATUS    RESTARTS   AGE
    172.31.23.166-7464f44944-nlbj2    0/2     Pending   0          9s
    edgecontroller-5464c96d6c-tmqfs   1/1     Running   0          42s
    
    $ kubectl describe pods 172.31.23.166-7464f44944-nlbj2 -n kubeedge
    Name:               172.31.23.166-7464f44944-nlbj2
    Namespace:          kubeedge
    Priority:           0
    PriorityClassName:  <none>
    Node:               <none>
    Labels:             k8s-app=kubeedge
                        kubeedge=edgenode
                        pod-template-hash=7464f44944
    Annotations:        <none>
    Status:             Pending
    IP:
    Controlled By:      ReplicaSet/172.31.23.166-7464f44944
    Containers:
      edgenode:
        Image:      kubeedge/edgecore:latest
        Port:       <none>
        Host Port:  <none>
        Limits:
          cpu:     200m
          memory:  1Gi
        Requests:
          cpu:     100m
          memory:  512Mi
        Environment:
          DOCKER_HOST:  tcp://localhost:2375
        Mounts:
          /etc/kubeedge/certs from certs (rw)
          /etc/kubeedge/edge/conf from conf (rw)
          /var/run/secrets/kubernetes.io/serviceaccount from default-token-lpftk (ro)
      dind-daemon:
        Image:      docker:dind
        Port:       <none>
        Host Port:  <none>
        Requests:
          cpu:        20m
          memory:     512Mi
        Environment:  <none>
        Mounts:
          /var/lib/docker from docker-graph-storage (rw)
          /var/run/secrets/kubernetes.io/serviceaccount from default-token-lpftk (ro)
    Conditions:
      Type           Status
      PodScheduled   False
    Volumes:
      certs:
        Type:          HostPath (bare host directory volume)
        Path:          /etc/kubeedge/certs
        HostPathType:
      conf:
        Type:      ConfigMap (a volume populated by a ConfigMap)
        Name:      edgenodeconf
        Optional:  false
      docker-graph-storage:
        Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
        Medium:
        SizeLimit:  <unset>
      default-token-lpftk:
        Type:        Secret (a volume populated by a Secret)
        SecretName:  default-token-lpftk
        Optional:    false
    QoS Class:       Burstable
    Node-Selectors:  <none>
    Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                     node.kubernetes.io/unreachable:NoExecute for 300s
    Events:
      Type     Reason            Age                From               Message
      ----     ------            ----               ----               -------
      Warning  FailedScheduling  46s (x2 over 46s)  default-scheduler  0/2 nodes are available: 1 Insufficient cpu, 1 Insufficient memory, 1 Insufficient pods, 1 node(s) had taints that the pod didn't tolerate.
    

    Since when has it been failing:

    Reason for failure:

    Anything else we need to know:

    1. I set a taint on the primary node: node-role.kubernetes.io/master=:NoSchedule, which makes the master node unable to deploy any pods, I am not sure if this is correct
    2. The edge node does not do anything other than pulling the edgecore image and copying the edge certs file into the /etc/kubeedge/certs folder. Is there anything I missed?
    3. The edge deploy file has no information about the node select. When there are multiple edgenodes, how is it deployed to the correct node?
    4. Have you completed the function of connecting edge from cloud? Otherwise, how does cloud deploy pods to edge?
    kind/failing-test 
    opened by Rory-Z 36
  • Bump ginkgo from v1 to v2

    Bump ginkgo from v1 to v2

    What type of PR is this?

    Add one of the following kinds: /kind feature /kind test

    What this PR does / why we need it:

    Which issue(s) this PR fixes:

    Fixes #3829

    Special notes for your reviewer: This pr includes:

    1. upgrades vendor, go.mod and go.sum, also replace "github.com/onsi/ginkgo" with "github.com/onsi/ginkgo/v2".

    2. deprecated CurrentGinkgoTestDescription with CurrentSpecReport as suggested in the Migration Guide.

    3. refactors the ginkgo.Measure spec, and implement it with gmeasure.Experiment as suggested in the Migration Guide.

    4. revises the ginkgo version in scripts and github actions.

    Does this PR introduce a user-facing change?:

    
    
    kind/test kind/feature lgtm approved size/XXL 
    opened by Congrool 31
  • Pods are not leaving pending state

    Pods are not leaving pending state

    What happened: The pods are not leaving pending state on the cloud.

    What you expected to happen: The pod running on the edge node

    How to reproduce it (as minimally and precisely as possible): I have virtual mashines one is dealing the other one is dealing as edge. On the cloud: follow the instructions in the readme On the edge: follow the instructions in the readme Then I executed on the cloud side: kubectl apply -f $GOPATH/src/github.com/kubeedge/kubeedge/build/deployment.yaml

    Anything else we need to know?: I have tested the edge setup with make edge_integration_test (all tests passed) Edge node state is Ready. kubectl describe nginx-deployment output: output-kubectl-describe.txt

    Environment:

    • KubeEdge version: 1233e7643b25a81b670fe1bb85a8a93d58d3a163
    • Hardware configuration: Mem: 7.6G; 2 CPU
    • OS (e.g. from /etc/os-release): os-release.txt
    • Kernel (e.g. uname -a): Linux node 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
    • Others: vm running with libvirt quemu

    Do you need any more information?

    kind/bug 
    opened by subpathdev 31
  • Csidriver fixs

    Csidriver fixs

    What type of PR is this? /kind bug

    What this PR does / why we need it: This tries to fix some of the problems of the csi implementation.

    Which issue(s) this PR fixes:

    Fixes #2088

    Special notes for your reviewer: There are some of the fixes of the problems that I've found, but not all. I will continue working on this to drive csi driver work better.

    Does this PR introduce a user-facing change?:

    NONE
    
    kind/bug kind/feature size/L needs-rebase lifecycle/stale 
    opened by guihecheng 29
  • Edge node get not ready

    Edge node get not ready

    What happened: My edge node shows status not ready image

    What you expected to happen: My edge node hould be ready How to reproduce it (as minimally and precisely as possible):

    Anything else we need to know?: I post my logs below. cloudcore.log: image edgecode.log: image and my edge config file: image

    Environment:

    • KubeEdge version: v1.1.0
    • Hardware configuration: amd64
    • OS (e.g. from /etc/os-release): ubuntu 16
    • Kernel (e.g. uname -a):
    • Others:
    kind/bug 
    opened by zhangshen023 29
  • Fix: clean containers after `keadm reset`

    Fix: clean containers after `keadm reset`

    What type of PR is this?

    /kind bug /kind design

    What this PR does / why we need it:

    We need to recycle staled containers to avoid resource occupation, which maybe cause memory leak or something.

    You can see the details in the following issue.

    Which issue(s) this PR fixes:

    Fixes #1973

    Special notes for your reviewer:

    Does this PR introduce a user-facing change?:

    NONE
    
    kind/bug kind/api-change kind/design lgtm approved size/XXL 
    opened by ESWZY 28
  • Add maxPods/CPU/MEM SystemReservedResource configuration item

    Add maxPods/CPU/MEM SystemReservedResource configuration item

    What type of PR is this? /kind feature

    What this PR does / why we need it: Add maxPods/CPU/MEM SystemReservedResource configuration item Which issue(s) this PR fixes: Fixes #1832

    Special notes for your reviewer: Change some API items Does this PR introduce a user-facing change?: NONE

    
    
    kind/feature size/L needs-rebase 
    opened by qingchen1203 28
  • Failed to mount configmap/secret volume because of

    Failed to mount configmap/secret volume because of "no such file or directory"

    What happened: Failed to mount configmap/secret volume because of "no such file or directory". Although we can be sure that related resources are included in the sqlite.

    I0527 10:35:29.789719     660 edged_volumes.go:54] Using volume plugin "kubernetes.io/empty-dir" to mount wrapped_kube-proxy
    I0527 10:35:29.800195     660 process.go:685] get a message {Header:{ID:8b57a409-25c9-454e-a9ae-b23f0b1861a9 ParentID: Timestamp:1590546929789 ResourceVersion: Sync:true} Router:{Source:edged Group:meta Operation:query Resource:kube-system/configmap/kube-proxy} Content:<nil>}
    I0527 10:35:29.800543     660 metaclient.go:121] send sync message kube-system/configmap/kube-proxy successed and response: {{ab5f3aab-11ff-48cf-8c3b-c5ded97678db 8b57a409-25c9-454e-a9ae-b23f0b1861a9 1590546929800  false} {metaManager meta response kube-system/configmap/kube-proxy} [{"data":{"config.conf":"apiVersion: kubeproxy.config.k8s.io/v1alpha1\nbindAddress: 0.0.0.0\nclientConnection:\n  acceptContentTypes: \"\"\n  burst: 0\n  contentType: \"\"\n  kubeconfig: /var/lib/kube-proxy/kubeconfig.conf\n  qps: 0\nclusterCIDR: 192.168.0.0/16\nconfigSyncPeriod: 0s\nconntrack:\n  maxPerCore: null\n  min: null\n  tcpCloseWaitTimeout: null\n  tcpEstablishedTimeout: null\nenableProfiling: false\nhealthzBindAddress: \"\"\nhostnameOverride: \"\"\niptables:\n  masqueradeAll: false\n  masqueradeBit: null\n  minSyncPeriod: 0s\n  syncPeriod: 0s\nipvs:\n  excludeCIDRs: null\n  minSyncPeriod: 0s\n  scheduler: \"\"\n  strictARP: false\n  syncPeriod: 0s\nkind: KubeProxyConfiguration\nmetricsBindAddress: \"\"\nmode: \"\"\nnodePortAddresses: null\noomScoreAdj: null\nportRange: \"\"\nudpIdleTimeout: 0s\nwinkernel:\n  enableDSR: false\n  networkName: \"\"\n  sourceVip: \"\"","kubeconfig.conf":"apiVersion: v1\nkind: Config\nclusters:\n- cluster:\n    certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\n    server: https://10.10.102.78:6443\n  name: default\ncontexts:\n- context:\n    cluster: default\n    namespace: default\n    user: default\n  name: default\ncurrent-context: default\nusers:\n- name: default\n  user:\n    tokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token"},"metadata":{"creationTimestamp":"2020-04-21T14:50:46Z","labels":{"app":"kube-proxy"},"name":"kube-proxy","namespace":"kube-system","resourceVersion":"193","selfLink":"/api/v1/namespaces/kube-system/configmaps/kube-proxy","uid":"5651c863-c755-4da4-8039-b251efc82470"}}]}
    E0527 10:35:29.800949     660 configmap.go:249] Error creating atomic writer: stat /var/lib/edged/pods/25e6f0ea-6364-4bcc-9937-9760b6ec956a/volumes/kubernetes.io~configmap/kube-proxy: no such file or directory
    W0527 10:35:29.801070     660 empty_dir.go:392] Warning: Unmount skipped because path does not exist: /var/lib/edged/pods/25e6f0ea-6364-4bcc-9937-9760b6ec956a/volumes/kubernetes.io~configmap/kube-proxy
    I0527 10:35:29.801109     660 record.go:24] Warning FailedMount MountVolume.SetUp failed for volume "kube-proxy" : stat /var/lib/edged/pods/25e6f0ea-6364-4bcc-9937-9760b6ec956a/volumes/kubernetes.io~configmap/kube-proxy: no such file or directory
    E0527 10:35:29.801199     660 nestedpendingoperations.go:270] Operation for "\"kubernetes.io/configmap/25e6f0ea-6364-4bcc-9937-9760b6ec956a-kube-proxy\" (\"25e6f0ea-6364-4bcc-9937-9760b6ec956a\")" failed. No retries permitted until 2020-05-27 10:37:31.80112802 +0800 CST m=+2599.727653327 (durationBeforeRetry 2m2s). Error: "MountVolume.SetUp failed for volume \"kube-proxy\" (UniqueName: \"kubernetes.io/configmap/25e6f0ea-6364-4bcc-9937-9760b6ec956a-kube-proxy\") pod \"kube-proxy-gbdgw\" (UID: \"25e6f0ea-6364-4bcc-9937-9760b6ec956a\") : stat /var/lib/edged/pods/25e6f0ea-6364-4bcc-9937-9760b6ec956a/volumes/kubernetes.io~configmap/kube-proxy: no such file or directory"
    

    What you expected to happen: mount successffuly How to reproduce it (as minimally and precisely as possible): Sorry for I can not provide the way of reproduction. Anything else we need to know?:

    Environment:

    • KubeEdge version(e.g. cloudcore/edgecore --version): v1.3.0
    kind/bug 
    opened by GsssC 28
  • Move Docs to website repository and proposals to enhancements repository.

    Move Docs to website repository and proposals to enhancements repository.

    What would you like to be added: Move docs to website repository and proposals to enhancement repository.

    Why is this needed: The hyperlinks in the docs have a .html link which results does not redirect to correct page while moving browsing the docs in github repository. Also moving proposals to enhancements and docs to website repository will help in seperation and easy management/review of source code, documentation and enhancement proposals.

    Thoughts ?? @kevin-wangzefeng @rohitsardesai83 @m1093782566 @CindyXing @qizha

    help wanted important-soon kind/bug kind/cleanup kind/documentation 
    opened by sids-b 28
  • add an unusual case on kind to resource conversion

    add an unusual case on kind to resource conversion

    What type of PR is this? /kind bug

    What this PR does / why we need it: It added an unusual Kind to Resource conversion. In #2769 , we found that for resources like Gateway, the corresponding resource name should be gateways instead of gatewaies. Another example is a resource composed of multiple words, such as ServiceEntry. These are special cases that needs to be handled specially, so I created a crdmap to record the resource-kind relationship of crd.

    Which issue(s) this PR fixes: Fixes #2769

    Special notes for your reviewer: none

    Does this PR introduce a user-facing change?: none

    kind/bug size/XXL needs-rebase lifecycle/stale 
    opened by Rachel-Shao 27
  • cloudcore cannot send device information to edgecore

    cloudcore cannot send device information to edgecore

    What happened: when i run some experiment about device management i found that the device i created in k8s may not be sent to edgecore successfully.

    What you expected to happen: the device information is successfully sent to edgecore.

    How to reproduce it (as minimally and precisely as possible): this happend sometimes after i restart the edgecore. not every time but when it happened the device will never be sent successfully anymore.

    Anything else we need to know?: i found it could be related with objectsyncs.reliablesyncs.kubeedge.io. when the bug happened, i can find a crd of objectsyncs.reliablesyncs.kubeedge.io created. and only if i remove the crd and restart the cloudcore, the environment will be cleaned and the device will be sent successfully. and the bug can also affects other resources as well.

    Environment:

    • Kubernetes version (use kubectl version): 1.20

    • KubeEdge version(e.g. cloudcore --version and edgecore --version): 1.10.0

    • Cloud nodes Environment:
      • Hardware configuration (e.g. lscpu):
      • OS (e.g. cat /etc/os-release): Ubuntu 18.04.6 LTS
      • Kernel (e.g. uname -a):
      • Go version (e.g. go version):
      • Others:
    • Edge nodes Environment:
      • edgecore version (e.g. edgecore --version):
      • Hardware configuration (e.g. lscpu):
      • OS (e.g. cat /etc/os-release):Ubuntu 18.04.6 LTS
      • Kernel (e.g. uname -a):
      • Go version (e.g. go version):
      • Others:
    kind/bug 
    opened by RyanZhaoXB 3
  • rename fake kubeclient with kubeclient bridge

    rename fake kubeclient with kubeclient bridge

    Signed-off-by: Shelley-BaoYue [email protected]

    What type of PR is this?

    /kind feature

    What this PR does / why we need it: Rename fake directory in edged with kubeclientbridge, its more suitable and easy to understand.

    kind/feature size/L 
    opened by Shelley-BaoYue 1
  • add node-lease resource

    add node-lease resource

    What type of PR is this? /kind feature

    What this PR does / why we need it:

    This PR is part of commit in new-edged feature, which is relatively independent.

    Add create/update/query node-lease upstream message to improve performance.

    kind/feature size/L 
    opened by Shelley-BaoYue 1
  • can not update device message from cloudcore to edgecore

    can not update device message from cloudcore to edgecore

    What happened: 8月 11 13:38:43 edgecore[2454]: I0811 13:38:43.994083 2454 process.go:283] DeviceTwin receive msg 8月 11 13:38:43 edgecore[2454]: I0811 13:38:43.994650 2454 process.go:66] Send msg to the MemModule module in twin 8月 11 13:38:43 edgecore[2454]: I0811 13:38:43.994699 2454 membership.go:120] Membership event 8月 11 13:38:43 edgecore[2454]: I0811 13:38:43.995184 2454 membership.go:167] Add devices to edge group 8月 11 13:38:43 edgecore[2454]: E0811 13:38:43.997993 2454 imitator.go:89] failed to access database:sql: transaction has already been committed or rolled back 8月 11 13:38:43 edgecore[2454]: E0811 13:38:43.998053 2454 imitator.go:89] failed to access database:sql: transaction has already been committed or rolled back 8月 11 13:38:43 edgecore[2454]: E0811 13:38:43.998077 2454 imitator.go:89] failed to access database:sql: transaction has already been committed or rolled back 8月 11 13:38:44 edgecore[2454]: panic: failed to access database after 3 times try 8月 11 13:38:44 edgecore[2454]: goroutine 162 [running]: 8月 11 13:38:44 edgecore[2454]: k8s.io/apimachinery/pkg/util/runtime.Must(...) 8月 11 13:38:44 edgecore[2454]: /root/kubeedge/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:171 8月 11 13:38:44 edgecore[2454]: github.com/kubeedge/kubeedge/edge/pkg/metamanager/metaserver/kubernetes/storage/sqlite/imitator.(*imitator).Inject(0xc0004aa600, 0xc000cd8ea0, 0x24, 0x0, 0x0, 0x1828b69826c, 0xc000a58630, 0x8, 0x0, 0x0, ...) 8月 11 13:38:44 edgecore[2454]: /root/kubeedge/edge/pkg/metamanager/metaserver/kubernetes/storage/sqlite/imitator/imitator.go:48 +0x49e 8月 11 13:38:44 edgecore[2454]: github.com/kubeedge/kubeedge/edge/pkg/metamanager.(*metaManager).processUpdate(0xc000a582bd, 0xc000cd8ea0, 0x24, 0x0, 0x0, 0x1828b69826c, 0xc000a58630, 0x8, 0x0, 0x0, ...) 8月 11 13:38:44 edgecore[2454]: /root/kubeedge/edge/pkg/metamanager/process.go:149 +0x2f5 8月 11 13:38:44 edgecore[2454]: github.com/kubeedge/kubeedge/edge/pkg/metamanager.(*metaManager).process(0xc000a582bd, 0xc000cd8ea0, 0x24, 0x0, 0x0, 0x1828b69826c, 0xc000a58630, 0x8, 0x0, 0x0, ...) 8月 11 13:38:44 edgecore[2454]: /root/kubeedge/edge/pkg/metamanager/process.go:436 +0x305 8月 11 13:38:44 edgecore[2454]: github.com/kubeedge/kubeedge/edge/pkg/metamanager.(*metaManager).runMetaManager.func1(0xc000a582bd) 8月 11 13:38:44 edgecore[2454]: /root/kubeedge/edge/pkg/metamanager/process.go:476 +0x3f8 8月 11 13:38:44 edgecore[2454]: created by github.com/kubeedge/kubeedge/edge/pkg/metamanager.(*metaManager).runMetaManager 8月 11 13:38:44 edgecore[2454]: /root/kubeedge/edge/pkg/metamanager/process.go:462 +0x3f 8月 11 13:38:44 systemd[1]: edgecore.service: Main process exited, code=exited, status=2/INVALIDARGUMENT What you expected to happen:

    How to reproduce it (as minimally and precisely as possible):

    Anything else we need to know?:

    Environment:

    • Kubernetes version (use kubectl version):

    • KubeEdge version(e.g. cloudcore --version and edgecore --version): v1.9.2

    • Cloud nodes Environment:
      • Hardware configuration (e.g. lscpu):
      • OS (e.g. cat /etc/os-release):
      • Kernel (e.g. uname -a):
      • Go version (e.g. go version):
      • Others:
    • Edge nodes Environment:
      • edgecore version (e.g. edgecore --version):
      • Hardware configuration (e.g. lscpu):
      • OS (e.g. cat /etc/os-release):
      • Kernel (e.g. uname -a):
      • Go version (e.g. go version):
      • Others:
    kind/bug 
    opened by dafanshu 0
  •  Use containerd through edgecore changes before keadm join

    Use containerd through edgecore changes before keadm join

    What happened and what you expected to happen: Following this guide while using containerd right from the beginning: https://kubeedge.io/en/docs/advanced/cri/

    Performing the containerd changes in a generated edgecore.yaml

    remoteRuntimeEndpoint: unix:///var/run/containerd/containerd.sock
    remoteImageEndpoint: unix:///var/run/containerd/containerd.sock
    runtimeRequestTimeout: 2
    podSandboxImage: k8s.gcr.io/pause:3.2
    runtimeType: remote
    

    keadm join on the edge side requires an empty /etc/kubeedge directory. Therefore the edgecore.yaml changes can't be provided beforehand. The docker installation (apt install docker.io) works fine and of course doesn't need changes. Back to containerd, specifiying the overwrites for most parts of the edgecore.yaml

    keadm join --cloudcore-ipport=<myip:port> --edgenode-name=<unique-name-0> --remote-runtime-endpoint=unix:///var/run/containerd/containerd.sock --runtimetype=remote
    

    results in the sandbox error mentioned here: https://github.com/kubeedge/kubeedge/issues/3507

    What is the preferred way to update the edgecore.yaml beforehand and run containerd solely? I just need some guidance.

    Environment:

    • Kubernetes version (use kubectl version): Master: v1.24.3+k3s1 and Worker: v1.22.6-kubeedge-v1.11.1
    • KubeEdge version(e.g. cloudcore --version and edgecore --version): Both KubeEdge v1.11.1
    kind/question 
    opened by FischerLGLN 0
  • User Guide of List/Watch from EdgeCore

    User Guide of List/Watch from EdgeCore

    This User Guide Book will work after #4104 has been merged.

    Start List/Watch feature with default configure

    • Config CloudCore

    Enable DynamicController, SyncController and CloudHub as below:

    kind: CloudCore
    modules:
      cloudHub:
        enable: true
      dynamicController:
        enable: true
      syncController:
        enable: true
    
    • Config EdgeCore

    MetaServer starts with HTTPS by default and uses the default certificate (same with EdgeHub) for authentication. The server certificate authentication policy is VerifyClientCertificateGiven. VerifyClientCertIfGiven indicates that a client certificate should be requested during the handshake, but does not require that the client sends a certificate. If the client does send a certificate it is required to be valid.

    If this parameter Autonomyswitch is set to true, it will enable edge applications to carry out List/Watch operations locally from edge nodes when they are offline. In this scenario, List/Watch operations cannot be authorized and there is a risk of unauthorized data access. The default value is false which means the local List/Watch capability of the edge node is not provided when the edge node is offline.

    kind: EdgeCore
    modules:
      EdgeHub
        enable: true
      MetaManager:
        enable: true
        metaServer:
          enable: true
          autonomyswitch: false
          tlsCaFile: {deault-CA-cert-file-path}
          tlsCertFile: {deault-cert-file-path}
          tlsPrivateKeyFile: {deault-key-file-path}
    

    Use Curl to access

    For example:

    curl -k -H 'Authorization: Bearer xxx' https://127.0.0.1:10550/api/v1/namespaces/kube-system/pods

    Use Kube API client to access

    • Config .kube/config of your Kube API Client
    apiVersion: v1
    clusters:
    - cluster:
        insecure-skip-tls-verify: true
        server: https://127.0.0.1:10550
      name: {cluster-name}
    users:
    - name: {user-name}
      user:
        token: xxx
    

    Start List/Watch feature with mutual authentication TLS configure

    • Config CloudCore

    same as above

    • Config EdgeCore

    Users can configure a third-party certificate for MetaServer authentication. Ensure that the corresponding server/Client encryption certificate is used in the MetaServer server and Kube API Client.

    kind: EdgeCore
    modules:
      EdgeHub
        enable: true
      MetaManager:
        enable: true
        metaServer:
          enable: true
          autonomyswitch: false
          tlsCaFile: {your CA-cert file path}
          tlsCertFile: {your server-cert file path}
          tlsPrivateKeyFile: {your server-key file path}
    

    Use Curl to access

    For example:

    curl --cacert /file-path --key /key-path --cert /cert-path -H 'Authorization: Bearer xxx' https://127.0.0.1:10550/api/v1/namespaces/kube-system/pods

    Use Kube API client to access

    • Config .kube/config of your Kube API Client
    apiVersion: v1
    clusters:
    - cluster:
        certificate-authority: {your CA-cert file path}
        server: https://127.0.0.1:10550
      name: {cluster-name}
    users:
    - name: {user-name}
      user:
        token: xxx
        client-certificate: {your client-cert file path}
        client-key: {your client-key file path}
    
    kind/feature 
    opened by vincentgoat 0
Releases(v1.11.1)
Project Flogo is an open source ecosystem of opinionated event-driven capabilities to simplify building efficient & modern serverless functions, microservices & edge apps.

Project Flogo is an Open Source ecosystem for event-driven apps Ecosystem | Core | Flows | Streams | Flogo Rules | Go Developers | When to use Flogo |

TIBCO Software Inc. 2.1k Aug 11, 2022
A project outputs Bluetooth Low Energy (BLE) sensors data in InfluxDB line protocol formatA project outputs Bluetooth Low Energy (BLE) sensors data in InfluxDB line protocol format

Intro This project outputs Bluetooth Low Energy (BLE) sensors data in InfluxDB line protocol format. It integrates nicely with the Telegraf execd inpu

Marc Venturini 1 Apr 15, 2022
Raspberry pi project that controls jack-o-lantern via servo motor and PIR motion sensors

pumpkin-pi ?? Raspberry pi project that controls jack-o-lantern via servo motor and PIR motion sensors to simulate it "watching" you. Inspired by Ryde

Caleb Lemoine 15 Nov 29, 2021
Golang framework for robotics, drones, and the Internet of Things (IoT)

Gobot (https://gobot.io/) is a framework using the Go programming language (https://golang.org/) for robotics, physical computing, and the Internet of

The Hybrid Group 7.9k Aug 9, 2022
Gobot - Golang framework for robotics, drones, and the Internet of Things (IoT)

Gobot (https://gobot.io/) is a framework using the Go programming language (https://golang.org/) for robotics, physical computing, and the Internet of Things.

The Hybrid Group 7.9k Aug 7, 2022
OpenYurt - Extending your native Kubernetes to edge(project under CNCF)

openyurtio/openyurt English | 简体中文 What is NEW! Latest Release: September 26th, 2021. OpenYurt v0.5.0. Please check the CHANGELOG for details. First R

OpenYurt 1.3k Aug 11, 2022
An edge-native container management system for edge computing

SuperEdge is an open source container management system for edge computing to manage compute resources and container applications in multiple edge regions. These resources and applications, in the current approach, are managed as one single Kubernetes cluster. A native Kubernetes cluster can be easily converted to a SuperEdge cluster.

SuperEdge 840 Aug 8, 2022
A Kubernetes Native Batch System (Project under CNCF)

Volcano is a batch system built on Kubernetes. It provides a suite of mechanisms that are commonly required by many classes of batch & elastic workloa

Volcano 2.5k Aug 9, 2022
Microshift is a research project that is exploring how OpenShift1 Kubernetes can be optimized for small form factor and edge computing.

Microshift is a research project that is exploring how OpenShift1 Kubernetes can be optimized for small form factor and edge computing.

Oleg Silkin 0 Nov 1, 2021
a small form factor OpenShift/Kubernetes optimized for edge computing

Microshift Microshift is OpenShift1 Kubernetes in a small form factor and optimized for edge computing. Edge devices deployed out in the field pose ve

Red Hat Emerging Technologies 380 Aug 6, 2022
Edge Orchestration project is to implement distributed computing between Docker Container enabled devices.

Edge Orchestration Introduction The main purpose of Edge Orchestration project is to implement distributed computing between Docker Container enabled

null 1 Dec 17, 2021
🦖 Streaming-Serverless Framework for Low-latency Edge Computing applications, running atop QUIC protocol, engaging 5G technology.

YoMo YoMo is an open-source Streaming Serverless Framework for building Low-latency Edge Computing applications. Built atop QUIC Transport Protocol an

YoMo 1.2k Aug 6, 2022
Zero - If Google Drive says that 1 is under copyright, 0 must be under copyleft

zero Zero under copyleft license Google Drive's copyright detector says that fil

d!key 59 May 16, 2022
Provide cloud-edge message synergy solutions for companies and individuals.the cloud-edge message system based on NATS.

Swarm This project is a cloud-edge synergy solution based on NATS. quikly deploy cloud deploy on k8s #pull the project. git clone https://github.com/g

null 1 Jan 11, 2022
dockin ops is a project used to handle the exec request for kubernetes under supervision

Dockin Ops - Dockin Operation service English | 中文 Dockin operation and maintenance management system is a safe operation and maintenance management s

WeBankFinTech 34 Aug 12, 2022
🐻 The Universal Service Mesh. CNCF Sandbox Project.

Kuma is a modern Envoy-based service mesh that can run on every cloud, in a single or multi-zone capacity, across both Kubernetes and VMs. Thanks to i

Kuma 2.3k Aug 10, 2021
🐻 The Universal Service Mesh. CNCF Sandbox Project.

Kuma is a modern Envoy-based service mesh that can run on every cloud, in a single or multi-zone capacity, across both Kubernetes and VMs. Thanks to i

Kuma 2.9k Aug 10, 2022
MOSN is a cloud native proxy for edge or service mesh. https://mosn.io

中文 MOSN is a network proxy written in Golang. It can be used as a cloud-native network data plane, providing services with the following proxy functio

MOSN 3.8k Aug 15, 2022
MatrixOne is a planet scale, cloud-edge native big data engine crafted for heterogeneous workloads.

What is MatrixOne? MatrixOne is a planet scale, cloud-edge native big data engine crafted for heterogeneous workloads. It provides an end-to-end data

Matrix Origin 1.1k Aug 10, 2022
An easy-to-use Map Reduce Go parallel-computing framework inspired by 2021 6.824 lab1. It supports multiple workers on a single machine right now.

MapReduce This is an easy-to-use Map Reduce Go framework inspired by 2021 6.824 lab1. Feature Multiple workers on single machine right now. Easy to pa

Bo-Wei Chen 194 Aug 10, 2022
CNCF Jaeger, a Distributed Tracing Platform

Jaeger - a Distributed Tracing System Jaeger, inspired by Dapper and OpenZipkin, is a distributed tracing platform created by Uber Technologies and do

Jaeger - Distributed Tracing Platform 16.2k Aug 12, 2022
CNCF Jaeger, a Distributed Tracing Platform

Jaeger - a Distributed Tracing System Jaeger, inspired by Dapper and OpenZipkin, is a distributed tracing platform created by Uber Technologies and do

Jaeger - Distributed Tracing Platform 16.2k Aug 10, 2022
CNCF Jaeger, a Distributed Tracing Platform

Jaeger - a Distributed Tracing System Jaeger, inspired by Dapper and OpenZipkin, is a distributed tracing platform created by Uber Technologies and do

Jaeger - Distributed Tracing Platform 16.2k Aug 9, 2022
Managing your Kubernetes clusters (including public, private, edge, etc) as easily as visiting the Internet

Clusternet Managing Your Clusters (including public, private, hybrid, edge, etc) as easily as Visiting the Internet. Clusternet (Cluster Internet) is

Clusternet 933 Aug 9, 2022
Secure Edge Networking Based On Kubernetes And KubeEdge.

What is FabEdge FabEdge is an open source edge networking solution based on kubernetes and kubeedge. It solves the problems including complex network

FabEdge 373 Aug 12, 2022
Project Flogo is an open source ecosystem of opinionated event-driven capabilities to simplify building efficient & modern serverless functions, microservices & edge apps.

Project Flogo is an Open Source ecosystem for event-driven apps Ecosystem | Core | Flows | Streams | Flogo Rules | Go Developers | When to use Flogo |

TIBCO Software Inc. 2.1k Aug 11, 2022
Sedna is an edge-cloud synergy AI project incubated in KubeEdge SIG AI.

Sedna is an edge-cloud synergy AI project incubated in KubeEdge SIG AI. Benefiting from the edge-cloud synergy capabilities provided by KubeEdge, Sedna can implement across edge-cloud collaborative training and collaborative inference capabilities, such as joint inference, incremental learning, and federated learning. Sedna supports popular AI frameworks, such as TensorFlow, Pytorch, PaddlePaddle, MindSpore.

KubeEdge 373 Aug 15, 2022
A serverless cluster computing system for the Go programming language

Bigslice Bigslice is a serverless cluster data processing system for Go. Bigslice exposes composable API that lets the user express data processing ta

GRAIL 505 Aug 12, 2022
A serverless cluster computing system for the Go programming language

Bigslice Bigslice is a serverless cluster data processing system for Go. Bigslice exposes composable API that lets the user express data processing ta

GRAIL 504 Jul 28, 2022