Learn

Closing the Cloud-Edge-Device Loop with Shifu and K3s

In recent years, edge AI has gained significant attention due to its ability to process data closer to its source, resulting in reduced latency and bandwidth usage. With the rise of the Internet of Things (IoT) devices, edge AI has become a critical part of the technology stack. However, managing edge devices and ensuring their interoperability with cloud and other edge devices remains a challenge.

Enter Shifu, a Kubernetes-native industrial edge solution that enables interoperability in an elegant manner. Shifu uses a distributed approach to virtualize each IoT device structurally and opens up their capabilities through Kubernetes services. This approach makes it easier to manage and integrate edge devices into the larger technology stack.

K3s, on the other hand, is a lightweight Kubernetes distribution designed by SUSE to run in resource-constrained edge environments. K3s is an ideal solution for edge environments that have IoT devices.

By combining Shifu and K3s, we can achieve a complete cloud-edge-device loop. This integration allows us to leverage Kubernetes' features natively and manage edge devices more efficiently. In this article, we will explore how Shifu and K3s can be used together to create a powerful and efficient edge AI solution.

Case Study

Let's take a look at a real-world example of how Shifu and K3s can be used together to create a powerful edge AI solution. Consider a smart city application that monitors and controls various IoT devices, such as traffic lights, surveillance cameras, air quality sensors, and weather stations. In this scenario, the edge K3s-shifu cluster can be deployed close to the IoT devices for low-latency processing and real-time decision-making. At the same time, the cloud K3s cluster can provide centralized data storage, analysis, and management services. To set up K3s+Shifu edge with K3s cloud, the following steps can be followed:

  1. Install wireguard on cloud
curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh
chmod +x wireguard-install.sh
./wireguard-install.sh
  1. Install k3s on cloud side with wireguard
curl -sfL https://get.k3s.io | sh -s - \
K3S_TOKEN=token \
INSTALL_K3S_EXEC="--advertise-address=10.66.66.1 --flannel-iface=wg0"  sh -
  1. Install k3s on edge side with wireguard
curl -sfL https://get.k3s.io | sh -s - \
K3S_TOKEN=token K3S_URL=https://10.66.66.1:6443  \
INSTALL_K3S_EXEC="--node-ip=10.66.66.3 --flannel-iface=wg0"
  1. Download Shifu: Download and extract the project files from https://github.com/Edgenesis/shifu.
  2. Install Shifu
kubectl apply -f shifu/pkg/k8s/crd/install/shifu_install.yml

By connecting the edge and cloud clusters, data from the IoT devices can be synchronized and processed efficiently. This enables the smart city application to make real-time decisions based on the collected data while still benefiting from the scalability, resilience, and resources provided by the cloud infrastructure. In addition, using multi-cluster management tools, operators can monitor and control the entire system from a central location, simplifying the management and deployment of the smart city application across both edge and cloud environments.

shifu-k3s

Cooperation Process

Edgenesis implements a structured professional cooperation process that includes:
Cooperation Process
Contact Us Background

If you're navigating the complex world of edge AI or IoT, reach out to us. Our team is dedicated to providing expert assistance, ensuring you receive the most professional support for your specific needs. Let's make your project a success together!

Book a Free Consultation