io.containerd.spin.v2, also called containerd-shim-spin, is the Spin-specific containerd runtime component that lets Kubernetes launch Spin WebAssembly workloads. It is packaged into a k3d node image and selected through a Kubernetes RuntimeClass. section 8.2.1
A practical Kubernetes setup connects the shim to the cluster in three steps:
- Create nodes from a k3d image containing containerd-shim-spin. section 8.2.1
- Define a RuntimeClass named wasmtime-spin-v2 with handler spin. section 8.2.1
- Set deployed workloads to use that RuntimeClass so Kubernetes can schedule Spin modules as pods. section 8.2.1
k3d cluster create wasm-cluster --image ghcr.io/spinframework/containerd-
➥shim-spin/k3d:v0.19.0 --port "8081:80@loadbalancer" --agents 2
Shows the k3d cluster command that supplies nodes with the Spin-compatible containerd shim. section 8.2.1
Listing 8.1 Spin RuntimeClass
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
name: wasmtime-spin-v2
handler: spin
Shows the RuntimeClass that exposes the shim to Kubernetes through the spin handler. section 8.2.1
