Overview

About this video

What You'll Learn

  1. Explain how KWasm installs WebAssembly runtimes onto Kubernetes clusters.
  2. Trigger node provisioning by annotating Kubernetes nodes for KWasm.
  3. Run WasmEdge and Spin workloads on kind and bare metal clusters.

Christopher and Sven from Liquid Reply walk through KWasm, the operator that installs containerd Wasm shims onto nodes via annotations. We deploy it to a kind cluster and a bare metal kubeadm cluster, then run WasmEdge and Spin workloads.

Chapters

Jump to a chapter

  1. 2:43 Introduction to KWasm and Guests
  2. 3:27 Guest Introductions
  3. 5:14 Running WebAssembly on Kubernetes Before KWasm
  4. 5:27 What is KWasm? (Installer Explained)
  5. 6:41 Session Plan and Kind Cluster Setup
  6. 9:30 KWasm Project Overview and Installation
  7. 12:03 Verifying KWasm Operator Installation
  8. 12:31 Triggering Node Provisioning with Annotations
  9. 14:12 How the KWasm Installer Works
  10. 16:27 Deploying a WasmEdge Example Workload
  11. 17:00 Hybrid Pods: WebAssembly & Containers
  12. 21:16 WasmEdge Workload on Bare Metal (Before KWasm)
  13. 22:43 Diagnosing WasmEdge Failure
  14. 23:04 Installing KWasm on Bare Metal
  15. 26:42 Debugging Bare Metal KWasm Installation (Containerd Config)
  16. 32:17 Successful Bare Metal Provisioning
  17. 33:16 WasmEdge Workload Succeeds on Bare Metal
  18. 33:41 Deploying a Spin Example Workload
  19. 34:30 Accessing the Spin Application
  20. 36:58 Inspecting the Spin Container (and Debug Attempt)
  21. 39:37 Exploring Spin Example Dockerfile & Config
  22. 41:20 Recap: How KWasm Enables WebAssembly
  23. 45:31 The Future Vision for KWasm
  24. 47:08 Conclusion and Get Involved
Transcript

Full transcript

Generated from the English captions. Timestamps jump the player to that moment.

Read the full transcript

2:43 Introduction to KWasm and Guests

2:43 Hello, and welcome back to the Rawkode Academy. I'm your host, David Flanagan. And today, we are going to take a look at KWasm. KWasm is a project that wants to make it easier for you to run WebAssembly workloads on your Kubernetes clusters. So guidance for today's session, I am joined by Christophe and Sven from Liquid Reply who are also working on the KWasm project. Hi there. How are both doing? Hello. Yeah. Thank you for for having us. Super excited to be here. Awesome. Well, let's start with a bit of a a round of introductions. Why don't you

3:23 just tell me more about each of you? Yeah. Sure. So I'm going to start. My name is Christopher. I'm living in, yeah, sunny Hannover in in Germany. I'm a father of two beautiful daughters, and I'm doing Golang and Kubernetes for a living. I'm a managing director at Liquid Reply consultancy, which is, like, focusing on Kubernetes, container orchestrators, and, yeah, cloud native technology. So we try to bring this cloud native and cloud agnostic mindset to our customers, And customers usually approach us to build up their Kubernetes clusters, to migrate workloads from on prem to the cloud,

3:27 Guest Introductions

4:09 to optimize their clusters, make them secure, find performance bottlenecks, write custom controllers, custom software on top of Kubernetes. And, yeah, all of a sudden, we found also found out that WebAssembly is also a nice target that can be run-in Kubernetes and became a research topic of of Liquid Reply. This is what we talk about today. Sven? Yeah. Hi. I'm Sven Van Nijk, lead developer at Liquid Reply. And, yeah, unfortunately, here we are allowed to dedicate some time for open source projects. And therefore, I turned the experimental work with Rawkode into an open source project. And, yeah, that's why we are here to

4:58 show you how easy it is to get started with WebAssembly and Kubernetes. Awesome. No. You're say something there, Christophe. Off on you go. How how easy it became, actually, because it was quite a quite a journey until became easy. Oh, yeah. Why don't we take a couple of minutes? Like, before KWasm, what what what was the process of running, and was it possible to run a WebAssembly workload on a Kubernetes cluster? Why don't you start with that? Yeah. So, basically, it's KWasm is not a runtime. It's not a Kubernetes distribution. It's just an installer. So we

5:27 What is KWasm? (Installer Explained)

5:36 take the awesome work of the people out there who have created integrations for WebAssembly on Kubernetes and install them on the cluster. So, yes, before it was possible to install it on your cluster, but you always need to know what you're doing. So in this round, that's not a problem at all. But when you think of an Blazor developer who has is is using his framework, it just outputs and represent the file. And now you're asking yourself, how can I run this? So for this audience, we created this installer to just have a Kubernetes cluster,

6:19 put an operator on it, label your notes, and you can theoretically start your represent applications. So what this means, we will see in a few minutes. But how it was before, Short spoiler. We will see in a few minutes after when we're doing this on our own cluster. Yeah. So let me fill the audience on on our mission and our plan for today. So when we talked about doing this, you've already said, right, it's easy. Like this was hard. It's very easy. And that you've done all this amazing tooling. And then we're gonna see the easy mode, which is to

6:41 Session Plan and Kind Cluster Setup

6:57 get KWasm to get a kind cluster ready for web assembly workloads. And you promised me, you've not promised, but I'm gonna tell everyone you promised me. But that's gonna take thirty seconds. Right? I'm sure it'll take maybe a little bit. Wow. No pressure. Absolutely no pressure whatsoever. Just for the audience, I I said under five minutes. Now it's thirty seconds. I've got faith in you. So but of course, I mean, I I spun up a bare metal cluster because that's every time I need to do something like Kubernetes, my my go to is bare metal.

7:30 And I think this will give us a really viable insights into what we actually need to do to prep a Kubernetes cluster for on a web assembly workloads and user. Hopefully, we're gonna be successful. Let's positive mindset here. We're we're gonna get this bare metal cluster running a web assembly workload or, you know, no. There's no failure. I'm not even gonna accept what we're gonna do. So I'm gonna I mean, there's a there's a very high chance that it that it's going to work. Right? I mean, we tried it with a lot of clusters from a lot

7:57 of cloud providers. So depending on your specific configuration, I guess, like, if if there's anything arcane going on in the machines, it should work as well. Yeah. It's a traditional Ubuntu machine, cube admin cluster, run-in container d. Hopefully, what most people are doing on the bare metal environment and not going to off the beaten track because keep admin works well, continue the works well and web assembly is the same prospect. We're gonna bridge all that as mission together and I'm excited for that. Cool. Let me share my screen. So there we go. We have a cane control plane, a cane cluster,

8:39 just a standard done five minutes ago with kind create cluster command. Nothing fancy here. Yeah. Russell, I was gonna mention the hoodie and I don't want to because I don't know how to pronounce that if it's or I or Ori. Maybe maybe Christophe will tell us. I personally pronounce it ori. Ori. Ori. Actually, I have I have no clue. I I should have followed a closer the the talk from from Chris Noble from the. So she was talking about ori and what it's like about. Definitely look into it. It's very it's very, very interesting and exciting project. Can we run

9:14 WebAssembly workloads on it yet? Not yet. Yeah. Alright. And that sounds like a coming soon segue. So Exactly. Alright. So I have my can cluster super vanilla. What I'm going to do is pull up KWasm here. So you've already kinda covered us, but let's just touch it again so we kinda clarify it for the audience. KWasm is not a runtime. So maybe you can give us a TLDR and what we're about to do to our kind cluster. So, basically, there are different kinds of runtime at the moment available. One is the WASM edge runtime, which is basically used by Docker

9:30 KWasm Project Overview and Installation

10:08 for this is powering the Docker WASM integration. And there is also the spin based containers. At the moment, there is a WASM node pool preview on Azure. So you could already use them on Azure with the node pool preview. And we thought, why not make it available to the other cloud and even for local development? So that's basically the idea using this existing run times and installing this on your cluster. On the left hand side, you have the quick start, and that would be everything you need to get started with your current cluster. Okay. So looking at this, KWasm can prepare

11:02 my cluster to run WASM edge applications, WASM time applications, even for me on spend applications, which is very exciting for me. I do a lot with spend, and I'm excited to see that in my Kubernetes cluster. So it looks like the installation is Helm based. Exactly. So we thought it is a common way to distribute some YAML, and that's why we just go with Helm. Alright. I'm just going to very quickly run through this. I am gonna modify your helm command because I don't know. I just feel very uncomfortable when I run helm install. I always have

11:41 to do upgrade dash dash install. Just I click the item put of it just makes me happy. So we're gonna have a home release. It's gonna be called KWasm operator and say the KWasm namespace and we have a chart KWasm KWasm operator. For anyone coming from Kubernetes, this is all stuff that they're very happy and comfortable with. So no surprises. I do want to do before we move on to annotate in any nodes is just look at what we have inside of our cluster. I'm assuming it's just gonna be a single pod running your KWasm controller.

12:03 Verifying KWasm Operator Installation

12:15 Yeah. It's just an operator using the operator SDK. It's written in Go. So if you're familiar with that, it's just all the defaults you could use. Alright. Now it doesn't do anything by default, I'm assuming, based on the fact that the next instruction is to annotate a node or all nodes in our cluster with KWasm.s h. Operator, so it should not do anything without you having to told it so. So there are also values in the values file of the Helm charts, so you could do it in one step. But to be safe, just install the

12:31 Triggering Node Provisioning with Annotations

13:03 Oh, we lost them. Lost everybody. Sorry. I have no idea what happened there, but I think it was an error on EK. Me neither. So Hopefully, Christophe comes back to join us. Yeah. Alright. Let's let's we'll carry on for now. Hopefully, he makes it back. I think it was just a temporary blip and it seems to have resolved itself now. So we were yep. There we go. Welcome back, Christophe. I don't know what happened. I think it's my software. I don't think it's you. Because I got an error message saying ECAM error, but it looks like we're okay now. So

13:57 Alright. Sweet. Yeah. So we're about to we've we've already annotated our note. I'm assuming now you've installed some sort of eBPF rootkit onto my machine. You have root access, and you're remaining on my bank details of Bitcoin. Is that correct? To to to be precise, yes. This just installing something from a random helm in the Internet, starting in super privileged container, which can do something on your notes is is as good as doing a curl and piping as with sudo and bash. So it's the the same safe situation you see on all the websites. So in in fact, we cannot we cannot

14:12 How the KWasm Installer Works

14:37 promise you what's happening in any any case. So, I mean, my understanding, and I'm often wrong, so feel free to correct me. Right? Is that we haven't really done anything to this cluster except you have provisioned some wasm run times onto the underlying host. So when you see the difference to see pods before, there is now a completed job. Yep. So yep. Exactly. And this job was just do executing a script, which so the container is running as root. In the script, you have some NS enter. You exit your container. You just walk out there,

15:22 place your binaries in the specific folders of your host system, and changing containerd config and restarting containerd. So we will see the script afterwards, but that's basically what happened. And as I said, it's like typing something from the Internet into your bash. You can just do anything. This is, by the way, also made maybe to to add on this because usually what what you do in case you want to do something on the host of on on the level of the host of multi mesh multiple machines, you're using a demo set. So we we considered using a demo set. But

16:00 what we didn't like about demo set that even after the install process, demo set would be still be provisioned on the node. So, therefore, this highly pro privileged container would also still live on your node. And, therefore, we basically decided to to start a job one once a new node is starting and, yeah, to to start the job and and and get rid of it when once it's done. So this basically was the idea. Cool. Yeah. And now when you look at the website, we have two example workloads. So one for spin and one for Watson

16:27 Deploying a WasmEdge Example Workload

16:35 Edge. So when you scroll down for Watson Edge, this is the manifest. You create a runtime class for c one because we are using the c one integration here and then starting a container and port with a container. So the one important thing is the annotation you see here. The module was an image variant. That's something special to c one. So c one usually works like run c as an OCI runtime. But if you give this annotation, it looks into the container and sees if it's web assembly container or Linux container. And if it's a web assembly container, it's

17:00 Hybrid Pods: WebAssembly & Containers

17:20 executed with Watson Edge. This approach makes it possible to start pods with Linux containers and WebAssembly containers. So your WebAssembly workload is, with C1, able to run-in, sidecar integrations like Linkerd, like KDA or, yeah, DEPR, whatever uses sidecar. So that's why we are using not the container d shim here, but the OCI runtime. We could use the other one as well, but this has still a slight advantage over the other one. So I wanted to confirm something there because I think it's something that that's really exciting for me personally and and hopefully for others. But using this approach with c run and

18:11 the annotations, we can have our main application. Right? Say that just happens to be a go by any rate right now that has a web server, server traffic to customers, maybe it's an API, whatever. It doesn't matter. Right? We can run a web assembly, server side web assembly workload and the same pod and perform standard sidecar capabilities. Maybe that's log transformations. Maybe that's metric collection or something like that. Is that something that is possible now or something that's possible in the future? So basically, you can now run pots with both type of containers when you are running

18:48 c one. So that's that's working. With the log transformation, that's slightly different because you need to access the logs. Yeah. So that's my application. Obviously, it's it's written to to to standard out, but I could have it multiplex that and put the standard out to fail as well. Can I share that fail with the WASM edge run time application? Let me short think about it. Yes. If it if it's available in the container, you should be able to access it. Isn't that cool? I'm That's cool. Right? It is. So I I haven't thought that to

19:34 an end because I was always doing it. It's the other way around. So it wasn't was always my main application, and I had supporting things around it. And I have never used Rawkode as a sidecar to support another application, but I like the idea. Well, yeah, I guess that's that's bidirectional. Right? I think it either way, I think the point is completely valid, and that's what I want people to kinda take away from here is that, you know, writing services web assembly is cool and I'm hoping that the audience is somewhat sold on that rate. And if

20:03 you're not go start experimenting with spend, there was imagine all these other runtime. But it's it's this been able to use web server side by side with containers, which is really appealing to me personally. And I think these kind of hybrid architectures are very will be very big in the future. But let's not take your word for it. Right? Should we deploy this? If you scroll down a bit, you you have the same safe approach to just put some YAML into your cluster. I'm I I I don't I don't mind. I trust you. Yeah. And that's running an, I would say,

20:36 extremely basic job, which is output we're putting some information from the environments, generating some random numbers, getting the environment variables. So just to show you that the WebAssembly integration is working. Maybe we should have started it before integrating the the WebAssembly runtime so that you can see it fail. But now you need to trust me that's a real WASM application and not something written in Go. Oh, don't you worry because look at us by the power of magic. We can go to another cluster that doesn't have KWasm installed. So let's see. I need my IP address

21:16 WasmEdge Workload on Bare Metal (Before KWasm)

21:18 because I've accidentally removed it from my dock. And we slightly hit the thirty seconds you have promised, but I think that's only because of connectivity issues. Yeah. Yeah. It's alright. I'll take the blame for that one. One hundred percent. So this is a bare metal Kubernetes cluster running on Equinix metal. We have a lot of cores, a lot of RAM, and we're gonna run the smallest web assembly workload in New Orleans. But still, it's it's fun. Right? So Yeah. There you go. For a Wow. Nice. Just for the giggles and what was the gig? Yeah. 64 gig of RAM. So

21:55 this is standard cluster. Like so. As running my cluster of workloads and a post goes up, but we can ignore that for now. That's just because I use the same automation just because it's a lot easier for me. But I'm gonna take your cube control apply command here. Now, I guess what's important here, right, is that we will be able to define the runtime class and we will be able to run the same job because these are standard Kubernetes objects. But they shouldn't run because it's going to try and run it with something that doesn't know how to interpret it. Is

22:30 that correct? Yeah. It's trying to find c run, and container d should reject that with, I don't know, something like c run. And therefore, it should stay in container creating forever. Okay. And if if you describe it, yep, you will see that it's just saying about I don't have this runtime. There we go. Perfect. Yeah. So now We need to get this working. Now Exactly. This might be a naive question. Are we just doing a helm install here? I would say we are looking at the installer, and you, who knows your cluster best, says if it would work or if it not

23:04 Installing KWasm on Bare Metal

23:19 would work. What do you think the probability is of me doing Helm repo add Helm install and it all just working magically? Yeah. 30%? I thought it would have been higher. Alright. I've do you want me to do this with Helm or do you want to do it manually? Let me let me ask that. Let's have a short look at the installer script, and then you can say if there would something be blocking the installer, and then we can try it. Okay? Yeah. Of course. On on the right upper side, you just end in the repository of the

23:59 operator. But if you go to the organization, there's also the KWasm node installer repository. And I I really love demystifying things, so there is no magic. So here's a Dockerfile in images installer, and the Dockerfile is just downloading compiling and downloading the runtimes and putting it in a folder called assets. If you go back and look at the script, there is an installer script. And it just tries to find out if the it's in an environment where you just not can't use the standard procedure, then it's slightly adapted. But in the end, you are just copying the binaries in some

24:56 spaces, like in this case, opt KWasm. You are linking the bin files, the lib files, and then this tiny container d config snippet is executed where you just add to your container d config, the c run runtime and the spin runtime, and I think also the slide runtime, but I haven't had no. I don't think so. And, yeah, after that, it's just restarting container d. So could work on a standard Ubuntu based container d and Kubernetes. Yeah. I I don't see anything here that has me concerned. No. The only thing It doesn't I don't know how your script handles it. Is I

25:43 don't think there's a container d config by default. But other than that, we should be okay. I'm assuming you just create it anyway if it doesn't exist. So let's say that I'm curious. So I've added the repository. Let's do the install. But this was the reason why I was asking, like, about the operating system beforehand because I knew that we are restarting with the system CTL. So Yeah. Yeah. This is a standard container to install system. D is there. I think Flexi? I think everything is gonna magically work, and the stream's gonna be finished, but everyone's gonna

26:24 be super happy because it just worked. Possibly. Yeah. Alright. Let's annotate our notes and see if we get our job. Almost. Oh, we got an error. Yeah. Luckily, we have an error. Alright. Let's more interesting. It's it's good. It's good. Hey, debug is my favorite pastime. I knew it was the container deconflict. So we could fix that. Right? We just need to create and generate the default container deconflict. So we could do that with is it container the config dump or is it try control? I can never remember. Yeah. The community config dump or default is probably what we Yeah.

26:42 Debugging Bare Metal KWasm Installation (Containerd Config)

27:22 And then we want to rate that to and we'll probably need to make that directory. Look good to you? Yeah. Mhmm. Interestingly, all of the other accumulators distributions always had a default container. Yeah. We do app install container d because it gives us a default contact. There's no tweaks. Yeah. It just works. Because as you know, I have a show called clustered. And every time I see a container d config, I know somebody's fucked with a container d config. So get pods. Hey, it worked. Yeah. That's it. Where's the job? Oh, no. It's on the KWasm interface.

28:08 Yeah. Alright. So those are all old. So will I have to clean them up to get a new one to start? Yeah. Let's just I need to delete all approach. That's how I fix things. So Okay. And now you would need to go to your notes and there are the there is the annotation we added, and there is another annotation provisioned. And we just need to remove it. So we need to edit the note. I mean, can I just do dash on this to remove Yeah? Yeah. Or no? Can maybe you can show the annotation so it's

28:52 so that we can see it, actually. Okay. Yeah. You're right. Sure. Yeah. So you want me to remove this? Yeah. Exactly. And then search for keywords. Yeah. Host. Yeah. Exactly. The no. Host name is okay. Yep. That should be it. Well, there's another node, so let me just delete. Oh, we we only need to start it on one node to see if it's working, and then we could do the other one. Okay. Re annotate it. And we should see, hopefully. Oh, we're not seeing the jobs now. Is that my fault? Okay. Now the real debugging starts.

30:03 Yeah. But the job already existed. We should probably have picked that up. Okay. Got it. So it created the job, but it didn't change and therefore yeah. Okay. So we'll edit our notes again. Search for KWasm.sh. Start deleting annotations, and then I'm gonna annotate one more time. I see we definitely need to to make it more comfortable to reprovision notes. Alright. Let's see if we can work out what's going on with this. So we still got an error. Oh, did I I created you. Oh, no. Wait. That's on the the worker node. Right? Possible. Yeah. Because I only did it on one

31:04 node, but that should be We should still see the workload scheduled. Right? Perhaps. Because it's scheduled on the worker note because of the scheduler and the tents. I love how I'm just making everything more difficult for you with my my setup. Yeah. Okay. Interesting. No. Yeah. Yeah. This is okay. Let me make sure the audience understands why we're running into a problem right now. Okay. So KWasm failed to do the installation because there was no default container decode. Now I create one on the control plane. Removed all the annotations and we run it again. However, our workload is scheduled on the

31:42 worker node where I did not create the default container deconfiguration. And that's why currently things are still not working. However, we can split this and I'll jump onto the worker node too. And all we need to do hopefully is make their container d and then do container d config at default and write it to the expected location. Now the config will exist, but we will need to reprovision the nodes potentially unless that job is still running. Maybe we hit the maximum retries. Yeah. I think that's definitely the case. So in order to clean this up, we do need to

32:17 Successful Bare Metal Provisioning

32:40 delete the job. We do need to edit the notes. Find the KWasm dot SH. Yeah. You only need to remove the label. Okay. Yeah. I just it's just easier, and then I'll just reapply it. Hopefully, we have two completely jobs. Wait. We have a computer. Yeah. So KWasm worked perfectly. The only problem was the container deconfiguration and my talking too fast and trying to debug thing. However Yes. This should mean we have our WebAssembly workload scheduled on the worker node. Feeling confident. This means you can you can create one of the first bug requests in

33:16 WasmEdge Workload Succeeds on Bare Metal

33:28 in the in the issues of our GitHub repository. That's nice. Look at that. And it wasn't that job completed. Alright. Now there was another example here. Right? Yeah. That Where we could run the spin application. Exactly. So shall we do that too? Yeah. Sure. So it's the same approach. We just create a runtime class. This time it's called wasn't time spent. And then we start, I would say, very simple example from the container d repository. Alright. So if we run now this one's running. Is it fair to say this is an HTTP application that's gonna

33:41 Deploying a Spin Example Workload

34:20 say hello world every time we call it? Exactly. Alright. Now it's just a deployment. Right? It's just a deployment. Okay. So there's no service, which means No service. We'll have to port forward Yeah. The deployment. Okay. Or just expose it. And I never remember the syntax for that. No problem. Yeah. Forward is fine. Yeah. I've I've no chance. So you can do the deploy. Can you can you port forward to deploy? Yeah. Yeah. You can. You can do a deploy slash and then the deployment name. It it resolves automatically a port and do that's a port forward to the plot a

34:30 Accessing the Spin Application

35:06 port, but it should work. And do you know the port number? I think it might be three Eighty. 80. It's just 18. Alright. So I need to get a second session on our control plan. No. Worker. Right? Worker. Worker. No. Because I'm port forwarding from it. I'll get there. Okay. Yeah. You should go get a 404. Right? Yep. So hello. Have a good one, And if you are on the worker node. Right? No. I'm on a control plane, but we're port forwarding from the control plane. Ah, okay. So interestingly, you could now see what the installer has

36:08 placed. So in the on the worker nodes in your opt folder, that should now be a bunch of binaries and lips. Yeah. There is a KWasm folder, and there are the bin and lib folders. And there you find the container d shims and the c one binary. And the c one binary needs the shared object from the bottom edge library, which is in the lip folder, and they are symlinked into the according folders of your operating system. Nice. This is pretty cool. Like, I now have a spin application running inside of my Kubernetes cluster, which I'm pretty happy with.

36:58 Inspecting the Spin Container (and Debug Attempt)

36:58 I I I think it would be worth to to look into the the container just to show what what's actually inside of the container that we are that we just provisioned. Because, like, a spin application needs at least your wasn't binary and also your your spin tunnel, like the configuration for the spin server. So is it gonna be possible for me to get a shell? No. It's No. Pretty like much like a distroless container, so you don't have a shell in there, which also means you could do a debug like with a distroless container. I mean, I'm gonna have to read the

37:37 help page for that because I have not used cube cube control debug very much at all. So let's copy one of these examples. Yep. Well, I think this one yeah. Add the debug container and exec into it. Yeah. And for space box. Okay. So let's get the pod names first because we'll need that. And then this is going to do keep control debug. I guess my apologies to debug pod name, which is going to run busy box and we want to oh, no. I think it's the other way around. Right? Mhmm. Yeah. So we want to

38:25 debug the spend. That sounds right. And we're gonna copy it to debug then. There's there's an s missing in the copy from the port name. Thank you. Yeah. One one thing I haven't thought about before is that we are now starting a Linux container in our spin pod, which is interpreted by the container d, shim spin, which can't handle Linux containers. So this approach is only possible with the c one, which is not running a server but an a job. Okay. Yeah. Things to improve. I I guess then then you have to leave us for now. And but we could at

39:30 least look into the Dockerfile so that you can see how we how we would create such a Dockerfile because Yeah. Yeah. Sure. So when you go into the repository of the days lapse guys of the container editions Oh, the days lapse one. Okay. Yeah. We are using the example directly from the source. Exactly. Repository? Yeah. It is. And then Efficient sources. Yeah. And then there are images. There is the spin example, and there is the Dockerfile. Right. So what it basically does is spinning up a build container, then doing the build of the binaries. So byte code

39:37 Exploring Spin Example Dockerfile & Config

40:29 files. And the in the end, it's just using from scratch and is copying all the files needed, which namely is the spin dot toml and the two modules that I referenced in that. The spin dot TOML is in this folder as well, so we can have a look at it. And here you see the two components, which are just referencing to an, WASM file that's in the root directory and a route where you can find it. This is the hello route we have used. So there's also the go hello route where you should get an hello from the go

41:15 module. Nice. Alright. Let's recap everything that happened here. So we had a vanilla Kubernetes cluster. We used helm to add the KWasm repository and install the KWasm operator. That's just my cluster and does nothing. When we annotate a node or multiple nodes and say that we want to run WebAssembly workloads on it, the controller will spin up a privileged pod and throw all the binaries that we need onto the host to run our WebAssembly workloads. This then means that we can add runtime classes or whatever web assembly runtime we wish to run workloads on whether that be WASM edge

41:20 Recap: How KWasm Enables WebAssembly

41:55 or spin or others. And then we just spin up norm pun not intended. Standard Kubernetes deployments with an annotation that says this is is was it smart compact, which tells it to find the correct web assembly workload to run an application. And by magic of everything that just happened, we can run our server side WebAssembly applications inside of a Kubernetes cluster, say by say, with container workloads even in the same pod. Is that right? Yeah. Absolutely. What a wonderful world we live in. And if you're, like, living on the cutting edge and you already have a working spin

42:34 application, then it should should already work. I mean, we we have some some limitations in terms of, like, for instance, the the Redis integration is not not yet working. But apart from this, like, as as as soon as you're not doing anything fancy, it should be working. And if you are doing anything fancy, so we are also glad to receive issues and forward them to the right position. So it should be more and more fancy with every release. Awesome. Alright. Let's pop back over to our big faces so we can kinda chalk this out. And there's one question on the

43:14 chat, which is unrelated, but, you know, I've got opinions. I'm just gonna answer anyway. And the bed is asking what is the most used CNI in production? Is it Celeam or Calico? I mean, I'm just gonna go straight and say, if you're not using Celeam, you're probably making a huge mistake. I'm such a huge fan of Celeam. Cloud providers are adopting a support in Celeam. Do either of you have any opinions on CNIs before I pop the question away? I I I tend to use Celeum since I first encountered in 02/2019 in the KubeCon NA, and and we're talking to those those

43:43 guys. And they're they're beautiful people. I had the chance to meet them in person and very, very clever guys. And the product itself is is really like a blast. And if you ever, like, had really a network problem and had the chance of using Hubble, their their visualization tool for for visualizing traffic and this kind of stuff. Like Oh, ended. Oh, sorry. Yeah. I couldn't agree more. I mean, Hubble is like a superpower. Right? That l four and l seven visibility into your applications been able to visualize network policies. This is not a silly unplug or whatever. I just a

44:21 huge fan of silly. I couldn't recommend that enough. Oh, we've lost them. Oh, we've lost. They are trying to join again. But of course, my software is being a pain in the ass today. Sorry, folks. We're we're so close to the financial end of my software. It's giving you both a hard time, so sorry about that. But thank you for coming back. You're back again. Just just one last thought about Cilium. I mean, there must be a reason that it's that it's basically used by all the major managed services. So. Yeah. Yeah. I couldn't agree more. It's fantastic.

45:01 Alright. Let's jump back to WebAssembly. We'll we'll we'll finish up. I wanna say thank you. You both spent a lot of time with me today as we've done a couple of activities. And it's just been fun talking to you. It's nice to meet and speak with other people that are as excited about this hybrid future world of web assembly and containers at the site. Something you mentioned earlier oops. When's it gone? I'm hoping that doesn't mean that you're gonna drop again. So That's good. You mentioned something earlier that I thought was interesting. We haven't mentioned on the stream. I

45:29 figured maybe we could touch on that. Like, the goal is for KWasm to not exist. Is is that correct? And maybe what's gonna happen in the next three six or nine months is gonna get us there. Exactly. So, like, KWasm is there to actually not exist to to bridge so, like, to to increase the adoption of of WebAssembly and to make people to make it easy for people to try WebAssembly out and run run on the Kubernetes cluster. Again, we are a Kubernetescom company, so we are actually not really earning money with WebAssembly. I mean, maybe some point in in the

45:31 The Future Vision for KWasm

46:02 future, maybe with with some some consulting in this something like this, but definitely not with KWasm. This is not the not the goal. And, also, like, we will probably not create any WebAssembly product or something like this. There are way more smarter people from from, as I said, Fermion wasn't cloud and so on. So from from our perspective, we try to contribute something back to the community, try to be on on the edge to to understand the the developments there. I'm not not sure. Sven, what do you think? He's thinking nothing or so he's not frozen at least.

46:51 No. But the audience are saying that it's potentially my bandwidth that is a problem. And this I've actually kind of we're streaming in four k, which was not intentional. And I think it's causing a little bit of problems. I'm not sure if when is is still here, but you know, This has been a lot of fun and keep as some people can go and play with it today. If you run into issues, open issues, feel free to contribute. It's all open source. Get involved. If you want to discuss WebAssembly Kubernetes in more details, reach out to Christophe or Sven.

47:08 Conclusion and Get Involved

47:28 Reach out to Liquid Reply. Get some assistance. Wonderful people doing a really cool work in this space. I just say thank you both for for oh, he's gone. Thank you for joining me today and showing us this project, showing us how to get started with server side web assembly in the Kubernetes environment. It's really exciting time, and I can't wait to do more with it. Any last words? And I'll let you go because it seems to be plentiful, plentiful problems today. Yeah. Just thank you for having us. And as I just mentioned, if you have any

47:57 kind of questions, feel free to reach out either on repository or as well. We are both also available via Mastodon and then Twitter. So these are probably the best ways to approach us. And, also, like, if you have any kind of, like, improvements or things that you would like to see, so we're happy to integrate this. Can you hear us now, Sven? I think he's gone again. Yeah. Well, sometimes there's problems in the streams. And I'm really sorry about that. But thank you again. I'm glad we could at least still talk and finish up. So have a wonderful

48:34 day. I'll speak to all soon. And thank you all for watching. Thank you so much. Bye.

Technologies featured

Meet the Cast

Weekly Cloud Native insights

Stay ahead in cloud native

Tutorials, deep dives, and curated events. No fluff.

Comments, transcript, and resources

More from Rawkode Live

View all 173 episodes
containerd

More about containerd

View all 23 videos
Kubernetes

More about Kubernetes

View all 172 videos
KWasm

More about KWasm

View technology
Spin

More about Spin

View all 20 videos
WasmEdge Runtime

More about WasmEdge Runtime

View technology