Getting Started With Kubernetes at the Edge

Gartner estimates that only 10% of data is produced and handled outside of traditional data centers today. Because of the rapid spread of the internet of things (IoT) and increased computing power on embedded devices, this figure is expected to rise to 75% by 2025. McKinsey identifies over 100 possible edge computing use cases with a potential $200 billion in hardware value produced over the next five to seven years.

In this article, you will learn how Kubernetes is quickly becoming one of the most popular solutions used by businesses to incorporate edge computing. You will also learn about the benefits of edge computing, the specific benefits Kubernetes offers to assist with edge computing and how Kubernetes distributions could be used for edge computing.

Benefits of Edge Computing

Edge computing has received a lot of attention and has become somewhat of a buzz word, but what does it truly mean for a business? Let’s look at some of the most significant advantages of edge computing.

Cost Savings

For applications with vast volumes (and velocity and variety) of data, processing data at the edge may be more efficient than paying for the bandwidth necessary to process that data in the cloud. To lessen the strain on your own cloud servers, computation can be done on client devices such as the user’s PC or even their smartphone in some circumstances.

You may also limit the quantity of data in the long run by doing real-time processing at the edge and just transmitting lower granularity to the cloud for long-term historical analysis.

Improved Performance

Moving the computing resources closer to users reduces latency, giving them a better experience. Because fewer round trips to data centers result in lower latency and lower bandwidth costs, new functionality and features become available.

Improved Reliability

End users will be more reliant on a well-designed application that takes advantage of edge computing. Even if a network connection to data centers is lost, critical work may still be completed by using edge computing capabilities. 

Edge computing also could assist your architecture in eliminating single points of failure.

Improved Security and Privacy

Edge computing can increase the security of your software application as well as the privacy of your users. When compared to a more traditional design, storing more data at the edge and away from centralized data centers helps limit the blast radius of security breaches. 

Edge computing can also make it simpler to comply with data privacy requirements. Instead of transferring data to the cloud and keeping it, it can be processed on the user’s own device or at the edge before being erased or altered to eliminate personally identifying information.

Why Kubernetes at the Edge?

Now that you’re aware of the numerous advantages of implementing edge computing, the question is how to go about doing so. There are several possible alternatives, ranging from developing your own platform to using a service supplied by another organization. Another approach for dealing with edge computing is to use Kubernetes.

From a technological and economic standpoint, there are various advantages to employing Kubernetes for edge computing. Kubernetes is already technically intended for operating across data centers and coping with difficulties that are inherent in edge computing. As a result, the transition from multi-region data centers to various edge locations isn’t all that difficult.

From a commercial standpoint, by selecting Kubernetes as your edge computing platform, you gain the advantages of the enormous community which, over time, saves you time by preventing you from having to implement several common features and guarantees the project is maintained and safe. 

Kubernetes Distribution Options

There are various choices for edge computing with Kubernetes in terms of both architecture and Kubernetes distribution. These distributions address some of the issues that make use of conventional Kubernetes for edge computing difficult.

KubeEdge

KubeEdge is probably a suitable option for explicit separation of edge and cloud as well as an overall Kubernetes deployment. KubeEdge provides an edge environment on a cloud platform and connects it to the main Kubernetes deployment through an edge controller. This results in a setup that is identical to a conventional Kubernetes deployment via both the edge and the core. However, administering the edge component is simpler since it requires less detailed rule-building to effectively guide edge pods to edge nodes and construct backup pathways. To access edge elements, KubeEdge additionally contains a lightweight, edge-centric service mesh.

Rancher K3s

K3s, a Rancher-developed small-footprint Kubernetes distribution that’s designed for edge missions with limited resources, is another package that may be crucial for Kubernetes at the edge. The footprint of K3s can be half or even less than that of the typical Kubernetes distribution, and it is fully CNCF-certified such that both are powered by the same YAML configuration files. By establishing an edge cluster, K3s further isolates the edge from the cloud. This configuration is advantageous in situations when edge pods cannot operate outside the edge due to limitations on resources or latency reasons. However, K3s features non-redundant components that might be risky, including database components like SQLite, and it can be more challenging to manage a distinct K3s edge cluster if administrators can assign the same pods to both the edge and the cloud.

MicroK8s

Canonical’s MicroK8s is a powerful, Cloud Native Computing Foundation-certified Kubernetes distribution. Below are some of the key reasons, why it has become a powerful enterprise computing platform:

  • Delivered as snap packages: These are application packages for desktop, cloud and even for IoT devices that are easy to install and secure with auto-updates and can be installed on any of the Linux distributions that support snaps. 
  • Strict confinement: This ensures complete isolation from the underlying operating system and a tightly secured production-grade Kubernetes environment.
  • Production-grade add-ons: Istio, Knative, CoreDNS, Prometheus, Jaeger, Linkerd, Cilium and Helm are available as add-ons. These are simple to set up with just a few lines of commands.
  • Kubeflow is also available as an add-on to MicroK8s for improved artificial intelligence (AI) and machine learning (ML) capabilities.

Additionally, MicroK8s can coordinate fully fledged cloud resource pools while having a tiny enough footprint to operate in environments with limited resources. Thus, MicroK8s is undoubtedly the edge Kubernetes solution that is the most edge-agile, and it does it without requiring a complicated installation or operation. 

Considerations for Choosing Edge Distributions

The most important question to ask when running Kubernetes at the edge is whether your organization’s edge resources are comparable to those in the cloud. If they are, the more effective setup is a standard Kubernetes deployment with set node affinities and related pod-assignment parameters to steer edge pods to edge nodes. For this kind of setup, consider KubeEdge if the edge and cloud environments are symbiotic rather than unified. 

The more dissimilar the edge and cloud environments or requirements are, the more logical it is to separate the two, especially if edge resources are insufficient to run standard Kubernetes. Use K3s or MicroK8s if you want common orchestration of both edge and cloud workloads. 

The book IoT Edge Computing With MicroK8s gives a hands-on approach to building, deploying and distributing production-ready Kubernetes on IoT and edge platforms. This edition has 400+ pages of real-world use cases, scenarios to help you successfully develop and run applications and mission-critical workloads using MicroK8s. Some of the key topics covered are:

  •  Implementing AI/ML use cases with the Kubeflow platform
  • Service mesh integrations using Istio and Linkerd
  • Running serverless applications using Knative and OpenFaaS frameworks
  • Managing Storage Replication with OpenEBS replication engine
  • Resisting Component Failure Using HA Clusters
  • Securing your containers using Kata and strict confinement options 

By the end of this book, you’ll be able to use MicroK8 to build and implement scenarios for IoT and edge computing workloads in a production environment.

Conclusion

The key takeaway here should be the adaptability of Kubernetes for edge computing. Companies of many sizes and in many sectors are leveraging Kubernetes’ capabilities to improve the efficiency and reliability of their applications.

Karthikeyan Shanmugam

Karthikeyan Shanmugam (Karthik) is an experienced Solutions professional with around 20+ years of professional experience across various industries. He is also contributing author at various technology platforms.

Karthikeyan Shanmugam has 7 posts and counting. See all posts by Karthikeyan Shanmugam