8 Scalability for Wasm with Kubernetes
This chapter covers
- Exploring the CRD and operator patterns in Kubernetes
- Extending Kubernetes to support Wasm workloads
- Using SpinKube to deploy Spin Wasm apps to Kubernetes
- Scaling Spin apps with Horizontal Pod Autoscalers
- Deploying wasmCloud applications to Kubernetes
Wasm has some clear advantages over containers. It’s smaller, which makes it quicker to transfer over the network. It starts up faster. And it's built with a stronger security model. But despite all that, Wasm is still playing catch-up when it comes to the mature tooling and ecosystem that containers enjoy.
In the last chapter, we looked at how to package Wasm applications as container images. Using the OCI image format, we tap into the rich tooling built for containers—most notably, Kubernetes.
Kubernetes is the standard way to manage containers in production. It takes care of scaling, load balancing, service discovery, and more. In this chapter, we’ll look at how Wasm can plug into that same system, and how we can take advantage of the Kubernetes feature set to run and manage Wasm workloads.