liveBook · Manning

RuntimeClass

As explained in Server-Side WebAssembly

RuntimeClass is a Kubernetes API resource that selects the container runtime configuration for running pods.

A RuntimeClass tells Kubernetes which container runtime configuration to use when launching pods. For Spin-based WebAssembly workloads, it selects the `spin` handler so Kubernetes can run them through the configured Wasm runtime. section 8.2.1

Listing 8.1 Spin RuntimeClass
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
    name: wasmtime-spin-v2
handler: spin

The manifest names the runtime class `wasmtime-spin-v2`, uses the Kubernetes `node.k8s.io/v1` API, and maps it to the `spin` handler. section 8.2.1

How Server-Side WebAssembly covers it

How deep it goes
Defines the resource manifest and runtime handler, but does not explain the handler's internal execution mechanics.
Examples
Uses a `wasmtime-spin-v2` RuntimeClass with `handler: spin`.
What it assumes
Assumes a Kubernetes cluster and runtime handler, while establishing the RuntimeClass needed for Wasm deployment.
What you can do after
Operate/configure Kubernetes to launch Spin-based Wasm workloads with the intended runtime handler.
How it connects
Connects Kubernetes pods, container runtimes, WebAssembly, and SpinKube orchestration.

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.