liveBook · Manning

Io.containerd.spin.v2

As explained in Server-Side WebAssembly

containerd-shim-spin is a Spin-specific containerd shim for running Spin WebAssembly workloads through the container runtime.

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

How Server-Side WebAssembly covers it

How deep it goes
Connects the shim to a k3d image and RuntimeClass but does not describe its internal execution path.
Examples
Uses the v0.19.0 k3d image and the wasmtime-spin-v2 RuntimeClass with handler spin.
What it assumes
Assumes Kubernetes cluster setup and introduces the runtime selection needed before deploying Spin applications.
What you can do after
Operate/configure a Kubernetes cluster so its nodes can launch Spin-based WebAssembly workloads.
How it connects
Links containerd with Kubernetes, RuntimeClass, Spin workloads, and SpinKube orchestration.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Server-Side WebAssembly. The section links point to the parts of the book it draws on.