跳至主要内容

Use WasmEdge with containers and Kubernetes

Choose the tool you use to start your workload. If you maintain the host or cluster, the same guides show where to enable WasmEdge.

ToolWhere to start
DockerRun WasmEdge inside a Linux container, or use an existing Docker Desktop installation with the Wasm feature enabled.
PodmanRun a WASI image with Podman. Check which WasmEdge-enabled crun binary your host provides.
crunEnable WasmEdge in the OCI runtime used by Podman, containerd, or CRI-O.
KubernetesDeploy a Pod to a prepared cluster or configure the runtime on your nodes.

With containerd-shim​

A containerd shim connects containerd to WasmEdge. To configure a host yourself, install the runwasi shim and run a test image with containerd. For a cluster, continue to the Kubernetes setup guide.

containerd starting workloads through a runtime shim

With crun​

Check for +WASM:wasmedge in the output of crun --version. The crun guide covers packaged and source-built runtimes. After configuring crun, run a WASI image with Podman or connect crun to containerd or CRI-O.

With youki​

If your OCI runtime is youki, build it with WasmEdge support and run the sample image.

Kubernetes using WasmEdge through the container runtime

Examples we covered​

Use the WASI command example to check the program's output. For a long-running workload, use the HTTP server example and send a request to check that the server responds.