VOOZH about

URL: https://thenewstack.io/krustlet-brings-webassembly-to-kubernetes-with-a-rust-based-kubelet/

⇱ Krustlet Brings WebAssembly to Kubernetes with a Rust-Based Kubelet - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-06-15 03:00:05
Krustlet Brings WebAssembly to Kubernetes with a Rust-Based Kubelet
news,
Containers / Kubernetes / Software Development

Krustlet Brings WebAssembly to Kubernetes with a Rust-Based Kubelet

Written in Rust, Krustlet enable Kubernetes to schedule WebAssembly modules instead containers.
Jun 15th, 2021 3:00am by Mike Melanson
👁 Featued image for: Krustlet Brings WebAssembly to Kubernetes with a Rust-Based Kubelet
Feature Image par Arek Socha de Pixabay

In the world of Kubernetes, most programs extending Kubernetes are written in Go, and most applications orchestrated by Kubernetes are packaged as containers. These two things have become so common as to have become default, but neither is expressly necessary, as proven by an up and coming project out of Microsoft’s Deis Labs called Krustlet, which is currently in the process of joining the Cloud Native Computing Foundation (CNCF) at the Sandbox level.

Krustlet upends both of these Kubernetes customs, first in that it is written in Rust, the notably memory-safe language originally developed by Mozilla, and second in that its purpose is to enable Kubernetes to schedule WebAssembly modules in lieu of Open Container Initiative (OCI) containers. While the Krustlet team was careful to note during its launch a little over a year ago that WebAssembly and containers can act as “a complementary pair,” each with “their own set of unique advantages and disadvantages,” it is precisely those advantages they wanted to bring to Kubernetes.

“WebAssembly can do many of the same tasks that a container does, but it has a different operational profile. It can be run with far fewer privileges, it is smaller, and it is cross-architecture/cross-OS,” explained Matt Butcher, a principal software engineer with Azure Core in an email. “Being familiar with Kubernetes, we wanted to see if we could build a tool that executes Wasm inside of Kubernetes to illustrate the similarities and highlight the differences between Wasm and containers. That turned out to be a watershed moment. WebAssembly is showing even more promise than we originally imagined.”

According to Ralph Squillace, a principal program manager for Azure Core, there was another reason to bring WebAssembly to Kubernetes, as well.

“The driving power of the Kubernetes project was not so much in the container runtimes — even though they kickstarted the revolution — but in the control plane, the API that unifies the skillset and the tooling,” wrote Squillace in an email. “We wanted to see what could be done using a different sandboxed process approach (WASM) with that operational model — where could that go? Turns out, it goes well.”

The “Krustlet” name itself gives some indication as to what is going on here: Krustlet is essentially a kubelet written in Rust for the purpose of running WebAssembly. When the Kubernetes API receives a request, pointing to a container image, to create a new pod, kubelet normally responds and creates that pod to run the container image. In this case, when the Kubernetes API gets a request to create a new pod, but that request points to a WebAssembly module stored in an OCI registry, Krustlet responds instead. All of this happens through a Kubernetes system called “taints and tolerations,” and Butcher said that this was “what’s so fun about Krustlet: We could use Kubernetes unaltered — no patches, no special tweaks to the control plane — and Krustlet is just an alternative runtime that can be dropped into any Kubernetes cluster, instantly offering Wasm support.”

And while Squillace points out that containers are “far more useful for code reuse than WASM” — although he says the WebAssembly System Interface (WASI) may change that — WebAssembly, again, has some distinct advantages, especially when it comes to microservices and running in environments that benefit from small, fast binaries.

“We don’t see WebAssembly being used to repackage existing applications. But when it comes to the microservice architecture, we think WebAssembly might just be the sweet spot,” writes Butcher. “Startup speed, memory footprint, security, and even ease-of-development are all highly meaningful metrics when it comes to microservices. And these happen to be the strengths of WebAssembly. Our vision is to make it simple and enjoyable to build microservices in WebAssembly, and then deploy them using Kubernetes.”

By enabling WebAssembly, Krustlet offers increased density, faster startup and shutdown times, smaller network and storage footprints, and all of these are features that not only support microservices but also operation on the edge and in IoT environments. In addition, WebAssembly also offers the ability to run on multiple architectures without being recompiled, has a security model that distrusts the guest by default, and can be executed by an interpreter and streamed in, meaning it can be run on the smallest of devices.

“Krustlet, potentially combined with things like SUSE/Rancher’s k3s, can make inroads into IoT by providing a small-footprint extension to a Kubernetes cluster. This points to a sea change occurring in Kubernetes. When some folks at Google first wrote Kubernetes, they were thinking about clusters in the data center. But why think only in terms of the data center?” asks Butcher. “Imagine a world where the pod could be dynamically moved as close to the user as possible — down to a thermostat or a gaming console or a home router. And then, as the person left home, that app could ‘leave’ with them, hopping to the next closest place — yet still within the same cluster. Certainly, that’s tomorrow’s world, but Krustlet is a step toward realizing it.”

This next world of Kubernetes is certainly part of the reason the project is working to join the CNCF, explained Squillace, who also noted that the team behind the project is the same as that behind Helm, Brigade, and Porter — all CNCF projects.

“We really want to see Kubernetes succeed over the next decades. Krustlet expands what Kubernetes can do: Krustlet applications can be packaged by Helm and Porter, for example. These things indicate to us that Krustlet belongs in CNCF, where it can be one more useful piece in an expanding portfolio of cloud native tools,” said Squillace.

Currently, the Krustlet repository still displays a prominent banner declaring it to be “highly experimental,” but the project is expected to reach v1.0 in the coming months. Moving forward, Squillace said that the project “will focus on networking and adding more support for wasm runtimes, focusing on collaboration with approaches like Akri (for devices) and also smaller distributions like SUSE’s k3s.”

“Assuming that Krustlet finds its place in the Kubernetes ecosystem, it’s our hope that it becomes ‘boring’, that it is used, and it works,” Squillace said in the email. “It did, however, really solidify what could be done with WASM and in particular, the coming WASI specification work and module linking.”

Moreover, Squillace noted that there is a direct path from Krustlet, with its multi-runtime provider model, to the Bytecode Alliance — which included founding members Fastly, Intel, Mozilla and Red Hat — to support further work on WASM and the other features of WebAssembly components like linking and so on. Microsoft is also a member.

“Some of the leading lights of the cloud and WebAssembly world, like Google, Arm, and Shopify, have already joined the original founding members and we are excited for what the community can do together over the next year,” wrote Squillace.

TRENDING STORIES
Mike is a freelance writer, editor, and all-around techie wordsmith. Mike has written for publications such as ReadWriteWeb, Venturebeat, and ProgrammableWeb. His first computer was a "portable" suitcase Compaq and he remembers 1200 baud quite clearly.
Read more from Mike Melanson
SHARE THIS STORY
TRENDING STORIES
The Cloud Native Computing Foundation is a sponsor of The New Stack.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.