Mar 2, 2022

Containerless on Kubernetes

WebAssembly (Wasm) is one of the most exciting and underestimated software technologies invented in recent times. It's a binary instruction format for a stack-based virtual machine that aims to execute at native speeds with a memory-safe and secure sandbox. 

Wasm is portable, cross-platform, and language-agnostic—designed as a compilation target for languages. Though originally part of the open web platform, it has found use cases beyond the web. WebAssembly is now used in browsers, Node.js, Deno, Kubernetes, and IoT platforms.

WebAssembly on Kubernetes

Though initially designed for the web, WebAssembly proved to be an ideal format for writing platform and language-agnostic applications. 

You may be aware of something similar in the container world—Docker containers. 

People, including Docker co-founder Solomon Hykes, recognized the similarity and acknowledged that WebAssembly is even more efficient (than Docker) since it's fast, portable, and secure, running at native speeds. This means that you can use WebAssembly alongside containers as workloads on Kubernetes. 

Another WebAssembly initiative known as WebAssembly System Interface (WASI) along with the Wasmtime project make this possible.

    If WASM+WASI existed in 2008, we wouldn't have needed to created Docker. That's how important it is. Webassembly on the server is the future of computing. A standardized system interface was the missing link. Let's hope WASI is up to the task! twitter.com/linclark/statu…
    20:39 PM - 27 Mar 2019
    Lin Clark @linclark
    

WebAssembly on Kubernetes is relatively new, but it's already proving to be revolutionary. Wasm workloads can be extremely fast as they can execute faster than a container takes to start. The workloads are sandboxed and hence much more secure than containers; they are way smaller in size due to the binary format than containers.

If you want to learn more about WASI, check out the original announcement from Mozilla.


Links:

  • Learn more about WebAssembly (WASM) at WebAssembly.org.
  • https://dev.to/oktadev/containerless-how-to-run-webassembly-workloads-on-kubernetes-with-rust-2j8f