Build and Prepare the Wasm App
Learn how to build and prepare a wasm application and its environment.
We'll cover the following
In this lesson, we'll write a Wasm app and take it through all the steps required to run it on a Kubernetes cluster.
In the real world, cloud platforms, and other tools will simplify the process, and there are other ways to run Wasm apps on Kubernetes. However, this section gives us a deep understanding of everything involved so we’re ready to deploy and manage Wasm apps on Kubernetes in the real world.
In this and the upcoming lessons, we’ll complete all of the following:
Build a simple web app
Compile it as a Wasm binary
Build it into an Open Container Initiative (OCI) image
Push it to an OCI registry
Build a multi-node Kubernetes cluster
Configure the cluster for Wasm
Deploy the app to Kubernetes
We’ll need all of the following tools to run the applications.
Docker Desktop 4.27.1 or later
k3d 5.6.0 or later
Rust 1.72 or later with the wasm32-wasi target installed
Spin 2.0 or later
Getting Kubernetes chapter showed us how to install Docker Desktop and k3d. We’ll build a new k3d cluster in a later step. Go to this link to install Rust.
Once we’ve installed Rust, run the following command to install the wasm32-wasi target so that Rust can compile code to Wasm binaries.
Get hands-on with 1400+ tech skills courses.