WebAssembly enables running containerized applications in extremely small containers (as small as 2MB) by compiling code to a portable binary format that can be executed by lightweight runtimes like WasmEdge, allowing organizations to leverage the same source code for both native and WebAssembly deployments while achieving significant size reductions compared to traditional container images.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
WebAssembly on Kubernetes • Nicolas Frankel • YOW! 2025
Added:[applause] >> Hi everybody. Thanks to be here for this talk about WebAssembly on Kubernetes.
Well, I'm Nicolas Frankel, but who cares? I've been a developer before, then I went to developer advocacy, and now I'm back to software engineering.
Um Just a disclaimer before we start.
In general, I talk about something I'm very expert on, and here, this is completely different. This is more exploratory. It changes a lot with time.
I don't have that much time to keep up.
If you're interested, you need to do your own research. Don't come back to your boss saying, "Hey, this guy at this conference, he said to do that." And then in 6 months it doesn't work, and then I'm the guilty guy.
So, who here knows about Kubernetes?
Okay. Well, you are not an expert. You know about Kubernetes. I assume that everybody knows about Kubernetes. So, what probably you don't know about is WebAssembly.
Who here knows about WebAssembly?
Who here comes to discover about WebAssembly?
Who is the rest?
Um I like this illustration.
Uh do you know the story about the blind men and the elephants?
Like there is a story when you bring blind men into a room, and they need to touch the elephant, and depending on the part they touch, then they have a different mental model of what is an elephant. And I believe WebAssembly is the same. Depending on what part you are familiar with, you have a mental model of WebAssembly as something very specific. So, before I go to talk about WebAssembly on Kubernetes, I just want to talk about WebAssembly in general. Uh by the way, you see this is like generated uh picture because the guy is touching the back of the elephant and and he thinks it's a serpent and elephant at the same time.
So, it's pretty stupid, but I It's so stupid I like it.
I kept it because well, it's fun.
Um So, in order for you to understand what is WebAssembly, I want us to go back in time to understand how WebAssembly presented itself >> [snorts] >> back in 2018.
And then we will see how it evolved over the time because it's not set in stone.
Actually, you might have the correct mental model of something that was there in the past.
So, if you go on the Wayback Time Machine there and you check the WebAssembly WebAssembly website in 2018, they say, "Oh, it's compilation to the web."
And the idea at the time was well, JavaScript is great, but for performance reason, it might be pretty slow. It's not made for fast computation. So, we will provide something that is much much more performant and then we can use it for computation for for example, 3D or multimedia.
That's something I took from the time is I did a tutorial that was Conway's Game of Life.
No, come on. I'm not a bot.
No, I'm not a bot. Really?
No, I'm not a bot.
Is that okay?
That's the first time it happens to me.
What did I do?
Okay.
Um copy video URL do like this.
Yeah, I'm pretty agile.
When I need to.
Okay.
So, as I mentioned, this is Conway's Game of Life. This is not nothing new.
Um but then all the computation like the refreshing of the grid, the computation on every new position is made in WebAssembly. And you can see I have like around 60 frames per second, which is quite good.
All interaction is through regular JavaScript. So, every time I I click a button or I change something, then the JavaScript code is triggered and it calls the the WebAssembly code.
Uh you can still find it it it's fun to do.
Now, for what's 2 years, so not much, 2 years, now they mention a stack-based virtual machine, so we go into the details. They also mention not only deployment for the web, they mention explicitly client and server application. Like in the past, they mentioned for the web, but implicitly it was for clients.
And now they know, no no, it's not only for clients, now we also want to include server side.
So, the scope that was at the beginning like content to the browser, now is much much wider, much bigger.
And the use cases are also very different. Of course, they still like encompass the one that we have seen so far, but it's also polyglots like you work in a company, you work in Java, Rust,.NET, whatever, and then you need to do something else, but there is another stack that is much more focused on the task at hand. Well, you have two choices. You can continue to use your regular stack and use not the right tool. You can try to hire people for the new stack, but you don't know what questions to ask them.
You don't know whether they are good or not.
So, the idea is here we should have polyglot approach and then everybody can do their own stuff in their own language and have web assembly at the end and work toward the same goal.
You can have the same stuff if you are a vendor and a big problem of having a platform as a vendor is how do you allow uh your users to actually extend the platform? In general, it has been done by like custom scripting languages that are super super limited or very open languages such as Groovy or Lua that might be super dangerous because they allow a lot.
By having web assembly, you can restrict the capabilities while still having a lot and being performant.
Likewise, functions as a service, this is in the straight line of the performance and small devices because, well, it has a very small footprint.
Reminds you of something?
Let's see if that's the case.
And if you check the web assembly site now, you see now it's for all programming languages. Like before, it was like for C, C++ and Rust, like very very specific.
But now it's programming languages.
Who is a Kotlin user?
Nobody?
Wow.
I'm ashamed.
I love Kotlin and there is not a single Kotlin, Kotlin. You love Kotlin. Oh, yeah. Yeah, you you develop in Kotlin. I love Kotlin.
Yes, amazing. Now Kotlin compiles to WebAssembly. Even better.
There was a company that actually works a lot on WebAssembly.
And they say, "Now we have a Python API that compiles to WebAssembly."
So, who who is here a Java developer?
.NET?
Oh, lots. Python?
JavaScript?
Ah, it's pretty mixed, cool.
So, either your current stack actually can compile to WebAssembly at the moment, or it should be in the future if it, of course, can structure.
And then you can have multiple teams in your company um working on the same code base in different languages, which is super cool.
And the use cases is the sky is the limit, right?
You can do anything at this point.
At least that's what they want you to convince you of.
And so, the mental model of oh, WebAssembly is just the web is not true anymore. And there was a foundational blog post by another company that works on WebAssembly called Fermion. And in this article, they say, "Now WebAssembly has just like went over the boundaries of the web.
You can use WebAssembly if you want strong security because it run in the sandbox >> [snorts] >> or if you like small binary sizes, we will see that just afterwards.
Performance like support of many different OS and architectures and of course still it's still incomparable with the browser. So, with all those capabilities I guess that you want to try it, right?
It's a dream.
But actually, it's even more more than that. It's a very vivid, very living ecosystem.
So, all those products, all those companies, they somehow use WebAssembly at the moment to add something very specific. For example, you have Spin Cube that has something on Kubernetes as well. Wasmer Cloud, they mentioned the Kubernetes and of course as the name imply, the clouds.
Wasmer Edge is the one we will be using.
Wasmer, whatever. I mentioned the plugin system. So, for example, Envoy allows you to write extension in WebAssembly.
So, you don't need to know about C or C++. You can use whatever language you want that compiles to WebAssembly. You use a couple of APIs and then you can write your extensions.
I've talked a lot already and I want demos because otherwise it's just slide ware and you can do the same at home.
My demo will focus on three main points.
First, the container size.
Second, how you can do it from Rust. I'm sorry. I'm I'm not a Python developer.
Who here is a Rust developer?
Ah, much better.
More than Kotlin at least.
Um So, it's very hard for me. Hey, you can translate this experience from Rust to other stacks. That's for sure and as I mentioned, it depends lot on the stack, but at least from a Rust perspective, I can show you something. And finally, I want to show you how you can configure Kubernetes to do that.
So, the project architecture, well, the project, the small demo, um is how I can run a container in Kubernetes, obviously.
And it's an HTTP server.
So, I want to create an HTTP server, a web app. Which normally WebAssembly can't do, right? That's the the the opposite of WebAssembly.
Can't open ports. You you don't choose the network. Here, I want to do that.
That's my point. And for that, I will use uh a Rust uh framework called Axum, which is to develop web app.
I will have three different flavors of my containers. The first one is the one regular Rust developers do. Basically, you have a from and a very small image.
Like, can be um scratch, it can be distro static, and many very very small image. So, you compile your Rust uh sources to native, and you use it.
The second, I will compile to WebAssembly.
And my base image will be an embedded a WebAssembly runtime.
So, far so good.
And finally, I will use WebAssembly and start from a scratch container, from nothing.
And I will still run it inside of Kubernetes.
Sounds good to you?
That's good, because I have nothing else.
I have a couple of requirements.
And one of them is I want to use the exact same source code.
That's the idea, right? Just like in Rust, you can write Rust code and have different artifacts. Here, I want to have the same source code to both create my native code and create my WebAssembly.
If you know about HTTP bin, I will implement one single uh endpoint, which is the get request.
I will have two tunnel. So, if you don't know Rust tunnel, the tunnel file, the cargo tunnel file, actually, is how you describe the project.
It's for JVM developer, it's the palm.
For uh Python developer, it's the pipe project.tunnel. For the.NET developers, I have no clue. For uh the JavaScript developers, uh it's the package.json.
And I I will have three separate Docker files.
So, let's start looking at the codes.
I will remove my glasses.
Close all tabs, and let's start.
So, the source Big enough?
Okay.
Couple of imports, and here you can see that I lied a bit.
Slightly.
Because I said I want to have the exact same source code for all, right? To generate the same from the same source, different um bytecode, well, native or WebAssembly.
Here, it's just I lied a bit because I want inside of the binary, whether it's the native binary of the WebAssembly code, to have the flavor in which it's supposed to be. Not that it be a runtime configuration, that it's really baked in.
And for that I need to use the configuration of Rust to say, "Okay, if I pass this flag, then it will the flavor will be native. If I pass this flag at compile time, sorry, this flavor will be embedded and it will be runtime.
So, I will have one single const that depends how I compile it will give different results."
And then I can't actually cheat afterwards.
Um this is the main function.
So, there is one thing is WebAssembly doesn't support async stuff, so I will run everything to the same thread. And here is the magic. I will actually create a TCP listener and start it. So, normally I will do something that WebAssembly can't do. I will start a web app and listen to port 3000.
The rest is regular stuff. I'm reading the request. I'm getting the URI, the query parameters, the headers, and I return it as a JSON.
First thing, the TOML.
The TOML are here, native cargo TOML.
Rust developers, can you confirm that this is regular Rust, nothing mind-blowing?
There are a couple of hands. Yes.
Thanks.
Okay, good.
>> [snorts] >> Now, the not so regular part. Here is how I will compile with a toward WebAssembly.
So, if you are not used to it, Rust doesn't work like other regular languages I'm I know of.
In that case, in the case for example of Java, you say I depend on this jar and it will get the jar, the package manager will get the jar and it will use the jar at run time.
But the jar is already compiled. With Rust, you actually download the source of the crate you want to use and you compile it.
So what I'm doing here, I download the source, but I will patch the source.
And so I will patch the source of some of the crates that I'm using, for example the one that normally create a web server for something that is adapted to web assembly that normally couldn't be done in a regular web assembly a context.
So I'm patching two of them.
And now comes the fun part, the Dockerfile.
I'm using Rust.
I do whatever is necessary. So basically I install the tool chain.
I compile everything. And then afterwards, so this is a multi-stage Dockerfile, must multi-stage build Dockerfile. I start from, sorry, distro static and I run HTTP.
Easy peasy.
Web assembly embedded, meaning that I'm using for my base image, I will be using a wasm runtime.
Okay? So I do the exact same stuff. The only difference is I install a different target.
And of course, when I compile, I target web assembly.
Okay?
And now I'm running this binary, which is here to run the web assembly code.
Finally, this one is the most mind-blowing in general.
I do the exact same to start with. So, I install the tool chain to generate web assembly. I compile to web assembly.
And the second stage is I copy the wasm file and I run the wasm file.
And I start from nada, zero.
Isn't it amazing?
Let's start to check if it works.
So, normally, because I am used to forgetting stuff, this is wasm Kubernetes native, so I will docker run uh IT or RM. Don't forget the port, 3,000.
3,000.
Should work, right?
And now I curl.
Uh I will keep it this here.
I Oh.
No, here. I will curl here. Curl localhost 3,000/get.
If I jq it, jq.
Amazing. So, you see flavor native. This is what anybody would expect, right?
Nothing crazy.
I kill it.
I kill it.
I kill it.
Yeah, that's the problem when you start with a very, very small um distro base image. He's normally you should wire the sick term inside and I never do it because I'm super lazy.
Uh so I will docker PS.
And normally I will docker stop.
>> [snorts] >> Where is it?
This one.
And normally it is done. Okay? I can do the same with the embedded one.
Embedded one.
So far so good?
What I want to show you is also the images size.
Docker images grep wasm.
Wasm runtime 2 megs.
A bit more.
Who can beat that?
I mean 2 megs is nothing, right?
The native, which is very good, it's Rust, it's 12 megs.
And the embedded one is 8 megs.
So even if you don't use the native one, if you use the embedded one, so remember the native the embedded one means that you have a base image that is a runtime a wasm runtime container, you can still shave off space. I'm not talking about performance, just space.
But if you only have 2 megs, so let's try to run it.
It's called run time.
Oops.
Docker doesn't know how to run it.
Fun fact, 6 months ago it knew how to run it.
Doesn't anymore.
And this is the problem of web assembly, it changes all the time. Did that change? Did something happen to my machine? I don't know.
So we have very, very small container because we only have the web assembly file that can't run.
Fortunately, our goal is not Docker, it's Kubernetes.
So remember, 2 megs, unbeatable.
But doesn't work.
Hey, you can't have both, huh?
>> [laughter] >> So now I want to show you how to run on Kubernetes. And for that, I need to get a bit, not that deep, but a bit into Kubernetes.
You might know that Kubernetes itself or Docker don't run the containers themselves.
They delegate to something.
Uh the new Docker delegates to containerd before before it uses dockerd, and Kubernetes also by default delegates to containerd. But containerd doesn't run the container, either.
It delegates to something called a shim.
Guess what?
The shim doesn't run the container, either.
It delegates to something.
And in general, if you did nothing by default, it we'd probably use something called runc.
So, the idea here is that instead of having a containerd shim, we have a wasm edge shim that will call will delegate to the wasm edge binary.
Just the same way that the containerd shim delegates to the runc binary.
So, if you are super interested in that, you can check everyone's responsibility, but basically containerd is just the life cycle manager, the shim is the middle man, and runc or wasm edge is just a common line interface. So, you can basically call runc something.
I decided among all the runtimes available to use wasm edge. Spoiler, mhm, was perhaps not the great choice, but at least I learned a lot.
So, normally here, I would show you everything with the common line and the internet, and there is a chance it might not work.
So, what I did is I recorded the stuff already.
Yes, I'm like this.
So, I will clear, and I will do something called askinema askinema play, and it's called wasm edge cast.
Ready?
So, imagine it happens in real time.
So, what I will be doing, normally you would do that on the similar machine, but here I do it on my production machine, which is my laptop. First, I will SSH into uh the Kubernetes control Kubernetes.
Then I will download Rust installer.
Uh for whatever reason, I don't have the correct permission, so I need to copy the temporary file to another place where I have the permission. It's fine, too. And then I run the installer.
Because I'm super lazy, I will be using the default installation. I don't need to customize anything. So, again, if you are Rust uh developer, that is probably regular stuff. I installed the different components, Cargo, which is the package manager, and everything. The Clippy, which uh like allows you to for everybody to use the same Rust style, Rustfmt for the formatting.
Done.
Then I need to uh configure the environment so that it's part of my path.
Now I have Rust installed. Why do I need Rust? That's a good question.
Because WasmEdge actually there is no don don loadable library or binary or anything. I need to compile it by myself.
Which is what I'm doing here.
So, for that, I added Rust.
Uh now I have cloned the one Wasm-Edge, which contains all the different runtimes, including WasmEdge.
And now I will be making the stuff.
And so, for whatever reason, in that case, I think that at some point I will need to download a different Rust installation, and I have no clue why.
So, here I'm updating the Linux packages, like always.
Which I already did, but they choose this different registry.
So, now I'm preparing to build, and I'm building. And here, as you can see, it uses a different Rust version.
So, I'm downloading the components again.
Real fun stuff.
Uh but for for more serious thing, um, again, this should be done only once on a regular machine, and then you use the component itself directly.
But here I used my laptop, so I do everything on the same one.
And now it fetches the crates, it does all its magic.
And sorry, at the end of the process, I should have my WasmEdge binary ready.
I know it would be more impressive if if it was in real time, but it looks very good, right?
Perhaps once I shouldn't tell anybody, I would just say, "Oh, look, this is I will install and blah blah blah."
And now now I have the binary ready, and the last thing I need to do, and here it's where the Skenema doesn't work anymore, is I need to configure Kubernetes. So I need to go inside of Kubernetes in a very specific file to actually say, "Okay, now if I want to run web assembly stuff, you need to delegate to the WasmEdge shim."
So we can wait a bit if I find this one because I'm super lazy.
Up. Took.
So I can SSH into uh, it's minicube.
SSH profile Wasm.
And here I can do this, and I can find the wasm pod.
So, this is a regular configuration. So, normally here you have all the run times and the all the run times generally is just run C. It's big enough?
Yep. It's just run C. What I added was those two lines.
And basically it says, "Okay, if you find something that is there is a naming implicit convention, but basically it says if you find something that is wasm edge, you should run it with the wasm edge shim."
Good?
So, I can exit that.
And now I have built the images. The only thing that I need is to deploy to schedule the pods to Kubernetes. So, I will do that.
Uh no, I needs to have the native one.
So, this one.
Shall I do it again?
I I It's free. I will do it again.
Of course, everything is already applied. So, normally you shouldn't have any surprise like and change and change and change.
And change and change and change and and change and change and change.
Good. Now I can curl because they have been scheduled.
Can remove that. Remove that.
So, let's start with the native one, the one that already worked with Docker.
Flavors native.
I have additional headers because I'm going through Kubernetes, right?
And I added a parameter.
So, it gets me that.
I can do the same with the embed.
It still worked.
Yeah, it works again. And now, the thing that didn't work in Docker, are you ready?
Should I do it?
2 megs container running in Kubernetes.
And the exact same result. So, here you have an HTTP server that actually is made from WebAssembly running in Kubernetes in a 2 meg container.
Unbeatable.
And you know, at this point people applaud, but okay. THAT'S FINE. THAT'S FINE.
>> [applause] >> I I HEARD IN THE LAST IN THE PREVIOUS session that Australian were very shy, so that's fine.
So, now time to reflect.
There are good things and there are not so good things. First, yes, as mentioned, it's an HTTP server in Wasm.
It runs your code with 2 megs.
It's crazy.
The bad.
I told you WasmEdge, it might not have been a super wise choice, and the reason is the code isn't actively maintained.
So, the latest commit was in March 2024, which is not great, but for the runtime itself, it's even worse.
It hurts a bit.
But, the really the ugly is that I prepared this talk 6 monthses ago.
6 monthses ago, it worked perfectly.
Then, I went to go to Amsterdam, which is the sister parent, how can you do you call it? Go to conference compared to this one. Is it sister conference? Is it parent conference? Is it cousin conference? Is cousin?
Um that's the reason why I wear this this t-shirt, by the way. It's not that I love myself so much but I love myself so much.
But they gave it to me at the Go to conference and I thought every other speaker was at the Go to conference would come with their own t-shirt as well. But no, I'm the only idiot having my face and people now think that I I have a very high opinion of myself, which is true but not the reason why I'm wearing this t-shirt.
>> [sighs] >> Anyway, we prepared that the the talk 6 months ago and for Go to conference which happened in October or November, I thought okay, I will run the code.
The code didn't work anymore.
I had to actually downgrade Tokio version.
And though the the code like wasn't touched since 2024 March.
I had absolutely no clue why now it it failed afterwards.
And so it doesn't give you a good confidence, right?
So my summary is this world of WebAssembly and especially WebAssembly on communities is evolving like really really fast. If you're a startup and this you want to leverage this to have competitive advantage, just embrace it. It can give It can give you amazing results.
If you are a more traditional software shop, I wouldn't recommend it because it's super super risky and you might need to invest a lot of things into well, stuff that doesn't work out in the end or you need to get back in time.
Thanks a lot for your attention. You can follow me on all the social media including the dead birds.
Um if you are interested in the codes, uh everything is on GitHub, so you have a nice GitHub repo for that. And if you are interested in the blog post that I made 6 months ago, so with stuff that doesn't work anymore, but you still get the idea. Everything is on my blog. Thanks a lot.
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

WOW! Judge TURNS THE TABLES on Trump in His OWN $10B LAWSUIT!!!
MeidasTouch
197K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Steam and Xbox Just Dropped The Hammer On PlayStation
OhNoItsAlexx
9K views•2026-07-23

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23