Skip to main content


What is the cosmo-controller?

cosmo-controller is a Kubernetes operator Cosmonic has developed to enable a seamless integration between the Cosmonic and your Kubernetes clusters. Specifically, what the controller enables you to do is the following:

  1. Deploy and manage wasmCloud hosts in declarative manner using a dedicated Custom Resource Definition (CRD)
  2. Deploy and manage wadm applications just like any other Kubernetes-native resource.

Managing wasmCloud hosts connected to Cosmonic

The cosmo-controller manages a set of Kubernetes Deployments defined by a single CosmonicHostConfig CRD. The controller does all of the complex work of configuring your hosts to automatically connect into your Constellation running on Cosmonic with the correct NATS credentials.

The advantage to configuring these hosts with a single CRD is that you have a single place where you can make changes to the configuration of your hosts, and the controller takes care of the hard work of rolling out any changes.


  • Scaling the number of hosts you want to run in your cluster
  • Configuring hosts with a set of OCI registry credentials where you can pull private actors and providers
  • Deploying hosts into specific Kubernetes namespaces

Managing wadm Applications

wadm Applications are the recommended way to deploy WebAssembly applications to Cosmonic. The cosmo-controller integrates with the Cosmonic in order to create and manage the lifecycle of applications running on wasmCloud using the native Kubernetes extension APIs.

Deploying a wasmCloud application in to your Kubernetes cluster with the cosmo-controller installed as easy as running:

$ kubectl apply -f

application/xkcd created

kubectl apply application

You can also get a running application

$ kubectl get application xkcd

xkcd           v1.0.0-edge        v1.0.0-edge      Reconciling

kubectl get application

You can also list all applications running in Cosmonic:

$ kubectl get applications

bank-account   v0.1.0             v0.1.0           Ready
echo           N/A                v0.1.1           Undeployed
xkcd           v1.0.0-edge        v1.0.0-edge      Reconciling