---
title: "Custom Resource Definitions (CRDs) | wasmCloud"
description: "Reference for wasmCloud Custom Resource Definitions on Kubernetes — Host, Workload, WorkloadDeployment, and related CRDs that drive the platform."
canonical: "https://wasmcloud.com/docs/kubernetes-operator/crds/"
---

Version: v2

# Custom Resource Definitions (CRDs)

> **Discussed on the community call**
>
> Jeremy Fleitz demoed the new `WorkloadDaemonSet` resource, including its `replicasPerHost` and `maxConcurrentHosts` fields, on the [November 4, 2026 wasmCloud community call](https://wasmcloud.com/community/2026-11-04-community-meeting/). Read the [transcript](https://wasmcloud.com/community/2026-11-04-community-meeting-transcript/) or [watch the discussion from 32:27](https://youtu.be/PWrul2fTquw?t=1947).

When deployed to Kubernetes, the core primitives of wasmCloud are represented by [**custom resources definitions (CRDs)**](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).

wasmCloud uses CRDs from the [`runtime.wasmcloud.dev/v1alpha1`](https://wasmcloud.com/docs/kubernetes-operator/api-reference/) API package:

- [Artifact](https://wasmcloud.com/docs/kubernetes-operator/crds/#artifact) - `runtime.wasmcloud.dev/v1alpha1`
- [Host](https://wasmcloud.com/docs/kubernetes-operator/crds/#host) - `runtime.wasmcloud.dev/v1alpha1`
- [Workload](https://wasmcloud.com/docs/kubernetes-operator/crds/#workload) - `runtime.wasmcloud.dev/v1alpha1`
- [WorkloadDeployment](https://wasmcloud.com/docs/kubernetes-operator/crds/#workloaddeployment) - `runtime.wasmcloud.dev/v1alpha1`
- [WorkloadDaemonSet](https://wasmcloud.com/docs/kubernetes-operator/crds/#workloaddaemonset) - `runtime.wasmcloud.dev/v1alpha1` (since 2.12.0)
- [WorkloadReplicaSet](https://wasmcloud.com/docs/kubernetes-operator/crds/#workloadreplicaset) - `runtime.wasmcloud.dev/v1alpha1`

This document explains each of these custom resources at a high level. For a complete API specification, see the [API reference](https://wasmcloud.com/docs/kubernetes-operator/api-reference/).

> **Note**
>
> [`WorkloadDeployment`](https://wasmcloud.com/docs/kubernetes-operator/crds/#workloaddeployment) is the resource used to deploy Wasm workloads—if you're looking to quickly deploy a component, [start there](https://wasmcloud.com/docs/kubernetes-operator/crds/#workloaddeployment).

## Artifact

An [Artifact](https://wasmcloud.com/docs/kubernetes-operator/api-reference/#artifact) represents a Wasm component that can be referenced by Workloads. Artifacts define the image location and optional image pull secrets for accessing private registries. This can be used to fetch an OCI image and store its contents in a [NATS JetStream Object Store](https://docs.nats.io/nats-concepts/jetstream/obj_store).

The `Artifact` resource tracks individual revisions, publishing the artifact's location under `Status.ArtifactURL`. A [`WorkloadDeployment`](https://wasmcloud.com/docs/kubernetes-operator/crds/#workloaddeployment) can reference an Artifact as its component image. A new deployment will be automatically rolled out when a new image is detected.

Use `Artifact` when you want the operator to watch for new image versions and trigger rolling updates automatically, or to centralize image pull secrets so individual `WorkloadDeployment` manifests don't need to repeat them.

Example manifest:

yaml

```yaml
apiVersion: runtime.wasmcloud.dev/v1alpha1
kind: Artifact
metadata:
  name: http-hello-world
  namespace: default
spec:
  image: ghcr.io/wasmcloud/components/http-hello-world-rust:0.1.0
  imagePullSecret:
    name: ghcr-secret
```

## Host

A [Host](https://wasmcloud.com/docs/kubernetes-operator/api-reference/#host) resource defines a wasmCloud runtime environment, or **host**, which has a unique ID and can run Wasm workloads.

Example manifest:

yaml

```yaml
apiVersion: runtime.wasmcloud.dev/v1alpha1
kind: Host
metadata:
  name: host-sample
  namespace: default
  labels:
    hostgroup: default
hostId: NABCDEFGHIJKLMNOPQRSTUVWXYZ234567
hostname: host-sample.default
httpPort: 4000
```

Unlike most Kubernetes resources, the `Host` CRD does not use a `spec` wrapper — fields like `hostId`, `hostname`, `httpPort`, and `environment` are set at the resource root. See the [Host API reference](https://wasmcloud.com/docs/kubernetes-operator/api-reference/#host) for the full field list.

Since 2.12.0, seven `status` fields are optional rather than required: `version`, `osName`, `osArch`, `osKernel`, `systemCPUUsage`, `systemMemoryTotal`, and `systemMemoryFree`. Because they were required, a heartbeat arriving before the operator's cache was populated had to write placeholder values — `unknown`, or `0` — and so overwrote real ones. A heartbeat now updates only `lastSeen`, and those fields are written only when the host reports them. A `Host` whose system fields flickered to `unknown` or `0` between reports should be steady after upgrading. Apply the 2.12.0 `Host` CRD before upgrading the operator: against the old schema, which still requires those fields, a new host's first heartbeat is rejected. See [Apply the 2.12.0 CRDs before upgrading the chart](https://wasmcloud.com/docs/kubernetes-operator/crds/#workloaddaemonset).

## Workload

A [Workload](https://wasmcloud.com/docs/kubernetes-operator/api-reference/#workload) represents an application composed of one or more WebAssembly components and optional services. Workloads define the components, their configurations, volume mounts, and host interfaces they consume.

Workloads are analogous to Kubernetes Pods in that they typically are not managed individually, but are instead owned by a [WorkloadDeployment](https://wasmcloud.com/docs/kubernetes-operator/crds/#workloaddeployment), much as a Pod is owned by a Deployment.

Example manifest:

yaml

```yaml
apiVersion: runtime.wasmcloud.dev/v1alpha1
kind: Workload
metadata:
  name: hello-world
  namespace: default
spec:
  hostSelector:
    hostgroup: default
  components:
    - name: http-component
      image: ghcr.io/wasmcloud/components/http-hello-world-rust:0.1.0
      poolSize: 10
      maxInvocations: 1000
      localResources:
        environment:
          config:
            LOG_LEVEL: info
        allowedHosts:
          - api.example.com
  hostInterfaces:
    - namespace: wasi
      package: http
      interfaces:
        - incoming-handler
      config:
        host: my-app.example.com
  volumes:
    - name: cache
      ephemeral: {}
```

## WorkloadDeployment

A [WorkloadDeployment](https://wasmcloud.com/docs/kubernetes-operator/api-reference/#workloaddeployment) defines the deployment and scaling of Workloads across hosts. It creates and manages WorkloadReplicaSets to ensure the desired number of workload replicas are running.

`WorkloadDeployment` implements the Kubernetes `/scale` subresource, so `kubectl scale`, the Horizontal Pod Autoscaler, and KEDA all work against it without wasmCloud-specific glue. `spec.replicas` defaults to `1` when omitted. See [Autoscaling](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/autoscaling/) for HPA and KEDA examples.

Example manifest:

yaml

```yaml
apiVersion: runtime.wasmcloud.dev/v1alpha1
kind: WorkloadDeployment
metadata:
  name: hello-world
  namespace: default
spec:
  replicas: 3
  deployPolicy: RollingUpdate
  artifacts:
    - name: http-component
      artifactFrom:
        name: http-hello-world
  template:
    metadata:
      labels:
        app: hello-world
    spec:
      hostSelector:
        hostgroup: default
      components:
        - name: http-component
          image: ghcr.io/wasmcloud/components/http-hello-world-rust:0.1.0
          poolSize: 10
      hostInterfaces:
        - namespace: wasi
          package: http
          interfaces:
            - incoming-handler
          config:
            host: my-app.example.com
```

### Host Interfaces

Use the `hostInterfaces` field to define host interfaces used by the workload. Each entry requires `namespace`, `package`, and `interfaces`, and may optionally include `version`, `config`, and `name`. This section covers the structure of entries; for the complete list of config keys each interface reads, see the [Host Interface Configuration Reference](https://wasmcloud.com/docs/kubernetes-operator/host-interface-configuration/).

The optional `name` field enables **multi-backend binding**, meaning a component can import the same interface twice under distinct labels and have each labeled import routed to its own backend. This uses the Component Model's `implements` clause: the component declares each labeled import in its WIT world, and the runtime routes calls through the labeled namespace to the matching `hostInterfaces` entry.

The Component Model's `implements` proposal is what allows the runtime to bind the labeled imports at start time; it is on by default. Stock release images support multi-backend binding out of the box.

A component that needs two `wasi:keyvalue` backends declares two labeled imports in its WIT world:

wit

```wit
world my-app {
    import cache: wasi:keyvalue/store@0.2.0-draft;
    import sessions: wasi:keyvalue/store@0.2.0-draft;
    export wasi:http/incoming-handler@0.2.2;
}
```

Inside the guest, each label surfaces as its own import namespace: `cache::open("kv-bucket")` and `sessions::open("session-bucket")` reach two different backends without the guest needing to know which is which. The string passed to `open()` is the bucket name; the routing label is the WIT namespace, not an argument.

![Multi-backend binding: a component world imports wasi/store twice under the labels cache and sessions; each labeled import routes by name to its own hostInterfaces entry, one selecting a NATS JetStream backend and the other a Redis backend](https://wasmcloud.com/assets/images/multi-backend-binding-bae1a1f2e036922fa6f9dd597e2d3bda.webp)

Multi-backend binding ships for `wasi:keyvalue`, `wasi:blobstore`, `wasmcloud:keyvalue`, `wasmcloud:blobstore`, `wasmcloud:postgres`, and `wasmcloud:messaging/consumer`. That list bounds host-backed binding; a label naming a sibling component (since 2.10.0, below) works for any interface. Unlabeled imports of `wasmcloud:blobstore` and `wasmcloud:keyvalue/store` also work: they bind to the workload's default (unnamed) backend, so a component that needs only one backend can drop the `(implements ..)` label and still get a working binding.

yaml

```yaml
hostInterfaces:
  # Named: NATS-backed keyvalue for caching
  - name: cache
    namespace: wasi
    package: keyvalue
    interfaces: [store, atomics, batch]
    config:
      backend: nats
      url: nats://nats:4222
  # Named: Redis-backed keyvalue for sessions
  - name: sessions
    namespace: wasi
    package: keyvalue
    interfaces: [store]
    config:
      backend: redis
      url: redis://redis:6379
  # Unnamed: single HTTP interface (name not required)
  - namespace: wasi
    package: http
    interfaces: [incoming-handler]
    config:
      host: my-app.example.com
```

Naming rules:

- `name` is optional. Omitting it preserves existing single-backend behavior.
- When two or more entries share the same `namespace`+`package`, **all** of them must have a non-empty `name`.
- Names must be unique within a workload's `hostInterfaces` for the same `namespace`+`package`.
- Names must match `[a-z0-9][a-z0-9-]*` (DNS label style).
- A name declared here takes precedence over a component of the same name in the same workload (since 2.10.0).

Since 2.9.0 a labeled import can also be served by a plugin binding the operator declares in the host's [`plugins` block](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/helm-values/#runtimehostgroupsplugins): the label resolves against the binding's config, and the workload's entry may then omit `config`, carrying `name` alongside the required `namespace`, `package`, and `interfaces`. Under the default `workloadConfig: deny` policy, once the operator has declared any binding for a plugin, a manifest naming one it did not declare is refused at deploy.

> **Backend addresses are the operator's**
>
> Through 2.10.x the multiplexed keyvalue, blobstore, messaging, and postgres plugins claimed no config keys, so `deny` refused nothing on them and a manifest could set its own backend `url`, filesystem `root`, or redis `prefix`. Since 2.11.0 those keys belong to the operator and a manifest that sets one is refused at deploy — including on a chart install that declares no `plugins` at all, since `deny` is the default either way. The workload keeps `backend`. See [Operator-owned backend addresses](https://wasmcloud.com/docs/kubernetes-operator/host-interface-configuration/#operator-owned-backend-addresses) for the migration and for the `workloadConfig: warn` rehearsal.

Since 2.10.0 a label can also name a sibling **component**: an import under `(implements <name>)` where `<name>` matches another component's `components[].name` links in process to that component's export, for any interface. An explicit `hostInterfaces` entry `name` takes precedence over a component of the same name, so declaring the label routes to the host. An unlabeled import of an interface that two or more sibling components export is refused with guidance to add a label; labels resolve across semver-compatible versions, and a component resolving to itself is a no-op.

### Messaging subscriptions and consumer groups

As of wasmCloud 2.8.0, the `version` on a `wasmcloud:messaging` entry selects which `consumer` and `types` revision is linked for the component's imports: `"0.3.0"` binds the async surface, while `"0.2.0"` or an omitted version binds sync `0.2.0`. The handler revision follows the component's own export: the host invokes `handler@0.3.0` when the component exports it, falling back to `@0.2.0`. See [Interfaces](https://wasmcloud.com/docs/overview/interfaces/#wasmcloud-interfaces) for the differences. The config keys below apply to both revisions.

The built-in NATS `wasmcloud:messaging` plugin reads its config keys from the component's `localResources.config` first, falling back to the `config` on the workload's `wasmcloud:messaging` `hostInterfaces` entry (so workers in one workload can override the workload-scoped values):

- **`subscriptions`**: A comma-separated list of NATS subjects the component's `wasmcloud:messaging/handler` export subscribes to.
- **`consumer_group`**: Controls delivery when a component runs with multiple replicas. When omitted, replicas join a consumer group derived from the workload namespace, workload name, and component name, so exactly one replica handles each message. Set it to the special value `broadcast` to deliver every message to every replica (useful for cache invalidation), or to any other NATS-safe name (no whitespace, `*`, or `>`) to place subscribers in an explicitly named group (e.g., to share one group across components).
- **`max_in_flight`** (as of wasmCloud 2.8.0): Caps how many deliveries to the component may be in flight at once on a host, counted across the component's replicas on that host. Since 2.10.0 the gate is keyed by a stable identity the operator stamps on replicas, so replicas of one deployment share a single gate; earlier releases opened one gate per replica at the full ceiling. When omitted, the host's per-component ceiling applies. The key can only lower a component below that ceiling; a value above it is clamped to it with a warning. Raising a component past the stock ceiling requires raising the host's per-component flag. See [Messaging admission control](https://wasmcloud.com/docs/kubernetes-operator/crds/#messaging-admission-control) below.
- **`admission_wait`** (as of wasmCloud 2.8.0): How long a delivery waits for an in-flight slot before it is dropped. Accepts values like `45s`, `2m`, or bare seconds. Default `30s`, maximum `600s`.
- **`admission_group`** (since 2.10.0): Replaces the workload name in the admission gate's key. The gate is keyed by namespace, this name, and the component's own name, so setting the same `admission_group` on same-named components in different workloads puts them on one gate; components with different names never share one. Empty or whitespace values are ignored. The NATS backend reads `localResources.config` first and then the entry config; the in-memory `wash dev` backend reads `localResources.config` only.

yaml

```yaml
spec:
  template:
    spec:
      components:
        - name: order-processor
          image: ghcr.io/example/order-processor:0.1.0
          localResources:
            config:
              subscriptions: 'orders.received'
              consumer_group: broadcast
      hostInterfaces:
        - namespace: wasmcloud
          package: messaging
          interfaces: [consumer, handler]
```

#### Messaging admission control

As of wasmCloud 2.8.0, the host admits messaging deliveries to components through an in-flight limit, applied before any instance work begins (trigger services are exempt). The limit covers pooled and per-message components alike. Since 2.10.0 the gate is keyed by a stable identity the operator stamps on each replica, so every replica of one `WorkloadDeployment` draws on a single shared allowance; before 2.10.0 each replica's uniquely named `Workload` resource opened its own gate at the full ceiling, making a deployment's effective concurrency `replicas × max_in_flight`. If throughput drops after upgrading, raise `max_in_flight` (and the host ceiling if needed) to the intended aggregate. When a component is at its limit, further deliveries wait up to `admission_wait` for a slot; a delivery that cannot be admitted in time is dropped with a warning. There is no negative acknowledgment on core NATS, so size the limit for peak load rather than relying on redelivery.

Two host-level ceilings back the per-component limit, set as flags or environment variables on the host (on Kubernetes, via [`runtime.hostGroups[].env`](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/helm-values/#runtimehostgroupsenv-envfrom-and-extraargs)):

| Flag | Environment variable | Default |
| --- | --- | --- |
| `--wasmcloud-messaging-max-in-flight` | `WASH_WASMCLOUD_MESSAGING_MAX_IN_FLIGHT` | Derived from the instance pool (133 on a stock host) |
| `--wasmcloud-messaging-max-in-flight-per-component` | `WASH_WASMCLOUD_MESSAGING_MAX_IN_FLIGHT_PER_COMPONENT` | A quarter of the host total (33 on a stock host) |

The in-flight limit is distinct from [`maxConcurrency`](https://wasmcloud.com/docs/kubernetes-operator/crds/#component-resource-controls), which bounds calls on one warm instance, and from the [connection quotas](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/concurrency-and-connections/): it bounds how many messaging deliveries may be executing for the component at all.

### Runtime Configuration

Runtime configuration values (such as environment variables) may be supplied via the optional `localResources` subfield of the `component` field.

yaml

```yaml
localResources:
  environment:
    config:
      some_key: some_value
```

Environmental values may also come from ConfigMaps or Secrets. The following approaches are also valid:

yaml

```yaml
localResources:
  environment:
    configFrom:
      - name: my-configmap
    secretFrom:
      - name: my-secret
    config:
      literal_key: literal_value
```

### Volumes

A workload declares volumes under `spec.volumes` (or `spec.template.spec.volumes`) and a component mounts them through `localResources.volumeMounts`. Two kinds are available:

- **`ephemeral: {}`** — scratch space for the workload's lifetime, removed when it stops. Since 2.11.0 a starting host also clears scratch directories that dead hosts left behind; earlier releases accumulated them. The directory lives under the host's [scratch root](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/helm-values/#runtimehostgroupsscratchroot).
- **`hostPath`** — a pre-existing file or directory on the host machine. Since 2.11.0 the host must allow the path; see [Host filesystem access](https://wasmcloud.com/docs/kubernetes-operator/workload-security/#host-filesystem-access) and [Filesystems and Volumes](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/filesystems-and-volumes/).

> **`ephemeral` in the CRD, `emptyDir` in host errors**
>
> The CRD field is `ephemeral`, but the host's own messages, metrics, and logs call these volumes `emptyDir`, following the Kubernetes concept they mirror. Searching the docs for an error naming `emptyDir` will not find the field — look for `ephemeral`.

### Component resource controls

The `poolSize`, `maxInvocations`, `maxConcurrency`, `reclaimWindowSeconds`, `reclaimMinInstances`, `allowedHosts`, `allowedIpNameLookups`, and `allowedHostLoopbackPorts` fields on a component control how it runs inside the host. They are set under `spec.template.spec.components[*]` in a `WorkloadDeployment` (or directly in a `Workload`): the pooling fields directly on the component entry; `allowedHosts`, `allowedIpNameLookups`, and `allowedHostLoopbackPorts` nested under its `localResources`.

- **`poolSize`**: Enables warm-instance pooling; the value is the maximum number of warm instances the host keeps for this component. It has no effect on a **WASI 0.2 HTTP handler**, which serves one request per instance; since 2.11.0 the host warns when the field is set on one. Build for WASI 0.3 to keep HTTP instances warm. Each warm instance is owned by a long-lived driver that serves calls as concurrent tasks. Since 2.9.0 the pool serves every call path uniformly: inbound HTTP, component-to-component calls, async `wasmcloud:messaging@0.3.0` deliveries, and `wasmcloud:nats` core and key-value deliveries (JetStream deliveries keep their own warm set: they honor `poolSize` and `maxInvocations` but serve one delivery per instance regardless of `maxConcurrency`, because a delivery's message handle is tied to the store that must run it). A call routes to the least-loaded warm instance; if all are at their concurrency limit and the pool is under `poolSize`, a new warm instance starts; if the pool is full and saturated, the call reuses an already-built warm instance rather than instantiating a fresh one (since 2.9.0), so overflow costs queueing, not a cold start. When omitted, `0`, or negative, every invocation instantiates fresh. Note that when linked components share a store, pooling applies only if every component in that unit has `poolSize` set: one opted-out component disables pooling for the shared store.
- **`maxConcurrency`**: How many calls one warm instance may serve at the same time (only meaningful alongside `poolSize`). Unset means `1`: what a component gets without asking. Raising it lets an instance overlap calls while awaiting I/O, multiplying warm capacity to `poolSize × maxConcurrency` in-flight calls, and is only safe for a guest that yields rather than blocks.
- **`maxInvocations`**: Retires a warm instance after it has *admitted* that many calls: the instance stops admitting new calls, drains the ones it took, and is replaced. (Until the drain finishes it still occupies its pool slot, so a burst arriving mid-drain overflows onto the remaining warm instances.) When `0`, negative, or omitted, pooled instances are reused without limit. This is not a concurrency limit: it bounds instance reuse, not in-flight requests.
- **`reclaimWindowSeconds`** (since 2.9.0): Lets an idle pool shrink. Every window, the host computes how many instances the window's peak load actually needed (`peak in-flight ÷ maxConcurrency`) and retires idle instances above that count, draining them rather than interrupting calls in flight. Unset means warm instances are never reclaimed for idleness, the pre-2.9.0 behavior.
- **`reclaimMinInstances`** (since 2.9.0): A floor on reclaim: sweeps never shrink the pool below this count. It is not a warm-up target; a pool that never served a call stays empty. A floor at or above `poolSize` disables reclaim.

Two pooling caveats worth designing around: a warm instance's context (environment, config, volume mounts) is frozen for its lifetime (`maxInvocations` bounds how stale it can get, and reclaim retires idle instances) and a guest trap faults *every* call in flight on that instance. Background tasks a guest spawns without awaiting now survive across calls on a warm instance; a component that relies on background work being torn down with the call should not be pooled.

- **`allowedHosts`**: A list of hosts this component is permitted to make outbound HTTP calls to (e.g., `api.example.com`, `*.s3.amazonaws.com`, or `*` for any host). Entries are matched case-insensitively against the request's host. Calls to hosts not on the list are blocked, enforcing a least-privilege network policy for the component. The policy fails closed: an empty or omitted list denies all outbound HTTP, so a component that makes outbound calls needs either specific entries or an explicit `allowedHosts: ["*"]` for unrestricted egress. Since 2.11.0 an entry naming a host also grants the `wasi:sockets` name lookup for it, and grants raw-socket connections to the address that lookup returned, briefly and on the entry's port. An entry carrying a scheme but no port constrains the port only for a scheme with a known URL default (`https` 443, `http` 80); `redis://`, `postgres://`, and `nats://` leave the port open for a workload's own sockets. `*` is the exception to the grant: it permits connections but opens no lookup. See [Workload Security](https://wasmcloud.com/docs/kubernetes-operator/workload-security/#restricting-outbound-http-with-allowedhosts) for details and [Name grants on raw sockets](https://wasmcloud.com/docs/kubernetes-operator/workload-security/#name-grants-on-raw-sockets) for the socket half.
- **`allowedIpNameLookups`**: A list of names this component is permitted to resolve via `wasi:sockets` name lookup (added in wasmCloud 2.6.0 as `allowIpNameLookup`; renamed to its current form in 2.6.1). Entries may be exact hostnames, `*.suffix` wildcards, `*` (any name), or literal IPs. DNS resolution is denied unless granted — a lookup matching neither this list nor `allowedHosts` is denied, so a component that names neither must connect by IP address. Since 2.11.0 this list covers names *beyond* those `allowedHosts` already grants, so a component whose destinations are all listed in `allowedHosts` needs no entries here. See [Workload Security](https://wasmcloud.com/docs/kubernetes-operator/workload-security/#allowing-dns-name-lookups-with-allowedipnamelookups) for usage and a note on CRD versions.
- **`allowedHostLoopbackPorts`**: Ports this component may reach on the *machine's* loopback through the reserved name `host.wasmcloud.internal`. Entries are single ports with an optional protocol (`"5432"`, `"5432/tcp"`, `"53/udp"`), and no ranges, wildcards, or names. This is a two-key grant: the list is inert unless the host itself runs with `--allow-host-loopback` (off by default), so neither the workload author nor the operator can open this door alone. It covers raw `wasi:sockets` connections, and since 2.12.3 HTTP and gRPC to the reserved name as well — those additionally need `allowedHosts` to permit the request's scheme, host and port. `127.0.0.1` keeps meaning the workload's own virtual loopback. Reaching `localhost` or a loopback literal over HTTP is a separate 2.12.3 grant: an exact HTTP(S) URL in `allowedHosts`, with its port, which needs no host flag and confers no raw sockets. See [Workload Security](https://wasmcloud.com/docs/kubernetes-operator/workload-security/) for the socket policy context.

## WorkloadDaemonSet

A `WorkloadDaemonSet` (since 2.12.0) runs a workload on *every* host matching its host selector and follows the host set as it changes. Where a `WorkloadDeployment` spreads a total number of replicas across a host group, a `WorkloadDaemonSet` keeps `spec.replicasPerHost` instances on each host: add a host to the group and the workload appears on it, drain the host and the instances go with it.

Reach for it when a workload's job is tied to the host it runs on rather than to a share of traffic — a per-host log or metrics shipper, a node-local cache or sidecar a host's other workloads call, or a probe that has to report from every host.

yaml

```yaml
apiVersion: runtime.wasmcloud.dev/v1alpha1
kind: WorkloadDaemonSet
metadata:
  name: hello-everywhere
  namespace: default
spec:
  replicasPerHost: 1
  deployPolicy: RollingUpdate
  maxConcurrentHosts: 1
  template:
    spec:
      hostSelector:
        hostgroup: default
      components:
        - name: hello-world
          image: ghcr.io/wasmcloud/components/http-hello-world-rust:0.1.0
      hostInterfaces:
        - namespace: wasi
          package: http
          interfaces:
            - incoming-handler
          config:
            host: hello.localhost.direct
```

The `template` is the same [`WorkloadReplicaTemplate`](https://wasmcloud.com/docs/kubernetes-operator/api-reference/#workloadreplicatemplate) a `WorkloadDeployment` takes, so host interfaces, volumes, and [component resource controls](https://wasmcloud.com/docs/kubernetes-operator/crds/#component-resource-controls) all carry over unchanged. `spec.artifacts` and `spec.kubernetes` work as they do on a `WorkloadDeployment`.

Fields specific to this resource:

- **`replicasPerHost`**: Instances to keep on each matching host. Defaults to `1`. Unlike `WorkloadDeployment`'s `replicas`, it is a per-host count, not a total — the total is this multiplied by the number of matching hosts.
- **`deployPolicy`**: How a template change reaches the hosts. `RollingUpdate` (the default) starts the new instances on a host before stopping that host's old ones; `Recreate` stops every old instance at once.
- **`maxConcurrentHosts`**: How many hosts a `RollingUpdate` moves through at a time. Defaults to `1`.

A `WorkloadDaemonSet` creates `Workload` resources directly, each pinned to its host, rather than going through a `WorkloadReplicaSet`. It has no `/scale` subresource: the host set is the scaling axis, so scale the host group (or its [`replicas` Helm value](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/helm-values/#runtimehostgroups)) instead.

Status reports progress by host rather than by replica:

console

```console
$ kubectl get workloaddaemonset
NAME               PER-HOST   DESIRED   UP-TO-DATE   READY-HOSTS   READY
hello-everywhere   1          4         4            4             True
```

`status.desiredHosts` counts the schedulable hosts matching the selector, `status.updatedHosts` those with no instance of a previous template left, and `status.readyHosts` those running every instance of the current template. `status.replicas` totals instances across hosts. `status.hosts` lists only the hosts that are not ready or still carry an outdated instance, so it stays short on a large host group — an empty list on a `Ready` daemon set is the healthy state, not missing data.

> **Apply the 2.12.0 CRDs before upgrading the chart**
>
> Helm installs a chart's `crds/` directory on `helm install` only, never on `helm upgrade`. 2.12.0 adds the `WorkloadDaemonSet` CRD and changes four existing ones: `Host` (seven status fields become optional), `WorkloadReplicaSet` (the `/scale` subresource), and `WorkloadDeployment` and `Workload` (a corrected field description). Apply all of them before you upgrade the chart:
>
> bash
>
> ```bash
> helm pull oci://ghcr.io/wasmcloud/charts/runtime-operator --version 2.12.0 --untar --untardir /tmp/wasmcloud-chart
> kubectl apply --server-side -f /tmp/wasmcloud-chart/runtime-operator/crds/
> helm upgrade wasmcloud oci://ghcr.io/wasmcloud/charts/runtime-operator --version 2.12.0 --namespace wasmcloud
> ```
>
> Adjust the release name and namespace to your install, and pass `helm upgrade` the same values files you installed with.
>
> Skipping this is not only a matter of a missing new kind. With the 2.11 `Host` CRD still installed, the API server rejects the 2.12.0 operator's heartbeat for a newly registered host, because that heartbeat now writes only `lastSeen` and the old schema still requires the other seven fields. With the 2.11 `WorkloadReplicaSet` CRD, `kubectl scale` and HPA cannot target a replica set. Until the `WorkloadDaemonSet` CRD exists, `kubectl apply` of one fails with `no matches for kind "WorkloadDaemonSet"`.
>
> If the operator starts before the `WorkloadDaemonSet` CRD exists, it runs without that controller, polls for the CRD every 30 seconds, and exits once it appears so that Kubernetes restarts the pod with the controller registered. Expect one restart, not a crash loop.
>
> **2.12.2 changes the same four workload CRDs again**, adding a pattern to `volumeMounts[].mountPath` that refuses a path which is not absolute, or which has a `.` or `..` segment, at admission. A dot inside a segment, such as `/models/v1.2`, is fine. An upgrade from 2.12.0 or 2.12.1 therefore needs the same apply step, with the version in the commands above changed to the release you are moving to. Nothing breaks if you skip it — the host refuses such a path when the workload starts either way — but the rejection arrives at deploy instead of at `kubectl apply`.
>
> **2.12.3 changes the same four workload CRDs**, tightening `spec.volumes`: at most 64 entries, keyed by `name` so a duplicate is refused at admission, each name a DNS-1123 label of at most 63 characters, and a volume that sets both `ephemeral` and `hostPath` refused rather than resolved by precedence. The host enforces these when the workload starts either way, so skipping the apply moves the rejection to deploy rather than losing it.
>
> **2.13.0 changes five of the six** — every CRD but `Artifact`, which is unchanged across all three releases — and here the step is not just about earlier error messages:
>
> - `Host` gains `status.workloadIdentity`, which a host reports in its heartbeat when it supports workload identity. The operator uses it to place a workload that names an `identityRef`, so until the new schema is applied there is no field for the host to report it in.
> - The four workload CRDs gain `spec.identityRef`, and `Workload` gains `status.owner` and `status.identityLease`. [Owner-qualified grants](https://wasmcloud.com/docs/kubernetes-operator/workload-security/#owner-qualified-grants) depend on `status.owner` being writable.
>
> Apply the 2.13.0 CRDs before upgrading the chart, and upgrade the operator before the hosts — see the rollout note under [Owner-qualified grants](https://wasmcloud.com/docs/kubernetes-operator/workload-security/#owner-qualified-grants).

## WorkloadReplicaSet

A [WorkloadReplicaSet](https://wasmcloud.com/docs/kubernetes-operator/api-reference/#workloadreplicaset) ensures that a given number of Workload replicas are running at once. It is typically managed by a WorkloadDeployment but can be used directly for more granular control.

Since 2.12.0 it implements the `/scale` subresource too, so `kubectl scale`, HPA, and KEDA can target a `WorkloadReplicaSet` directly for the cases where you are managing one yourself. `status.currentReplicas` and `status.selector` exist to serve that subresource; `status.currentReplicas` mirrors `status.replicas.current` as a flat integer. The subresource is part of the CRD, so it exists only once the 2.12.0 `WorkloadReplicaSet` CRD is applied; `helm upgrade` does not apply it. Prefer scaling the owning `WorkloadDeployment` when there is one — a deployment reconciles its replica sets back to its own `spec.replicas`.

Example manifest:

yaml

```yaml
apiVersion: runtime.wasmcloud.dev/v1alpha1
kind: WorkloadReplicaSet
metadata:
  name: hello-world-v1
  namespace: default
spec:
  replicas: 5
  template:
    metadata:
      labels:
        app: hello-world
        version: v1
    spec:
      hostSelector:
        hostgroup: default
      components:
        - name: http-component
          image: ghcr.io/wasmcloud/components/http-hello-world-rust:0.1.0
          poolSize: 10
      hostInterfaces:
        - namespace: wasi
          package: http
          interfaces:
            - incoming-handler
          config:
            host: my-app.example.com
```

Last updated on **Dec 3, 2026** by **Eric Gregory**
