Architecture
Cosmonic Control is deployed on a Kubernetes cluster, or standalone with a dedicated API server. All Cosmonic Control deployments consist of the following elements:
Deployments may also include:
The diagram below provides a high-level representation of the management flow in a Cosmonic Control deployment. For a more detailed illustration of Cosmonic Control's deployment and tenancy model, see Multitenancy.
wasmCloud
wasmCloud is an open source project that orchestrates distributed WebAssembly (Wasm) applications across clouds, datacenters, edges, and Kubernetes clusters.
Cosmonic Control manages wasmCloud clusters, which consist of WebAssembly runtime environments called hosts. In Cosmonic Control, wasmCloud hosts are represented by the Host resource and run as Kubernetes pods.
WebAssembly components and wasmCloud providers are represented by the Component and Provider resources respectively and run on Host pods.
wasmCloud Controller
A Kubernetes controller monitors the state of a resource and makes changes to ensure that it matches the desired state. The Kubernetes documentation compares this control loop to a thermostat.
The wasmCloud Controller manages the Cluster and HostGroup custom resources.
Runtime Controller
The Runtime Controller manages the custom resources for components, providers, links, configs, and more, including the Component, Provider, and Link custom resources.
Custom Resources
Core primitives for wasmCloud and WebAssembly components are represented by Kubernetes custom resources, which are defined in Custom Resource Definitions (CRDs). Custom resources used in Cosmonic Control include:
Learn more in Custom Resources and in the API References.
API Server (Kubernetes)
When Cosmonic Control is deployed on a Kubernetes cluster, the system uses the cluster's API server.
When deploying standalone, Cosmonic Control is bundled with a dedicated, independent Kubernetes API server, meaning that you can interact with it exactly the same way as you would on Kubernetes (including using kubectl
, if you wish), but without the rest of the Kubernetes stack such as etcd, kubelet, etc.
Cosmonic Operator for wasmCloud
Kubernetes operators are software extensions that use controller patterns and custom resources to extend Kubernetes in a specialized way.
The Cosmonic Operator for wasmCloud is an optional way to manage elements of Cosmonic Control, including custom resources and all Kubernetes objects related to wasmCloud (e.g., Services, Secrets, Namespaces).
The operator builds on the Cosmonic controller to set up an optimized wasmCloud cluster out of the box, with features including:
- Management of multiple wasmCloud clusters within the same Kubernetes cluster
- mTLS certificate management
- Policy service
- Workload identity
- Integration with ArgoCD
- OpenTelemetry set up and ready for use
- Secure NATS
Console UI
The Console UI is a web-based user interface that integrates with the Cosmonic Control API, enabling users to view and manage resources such as WebAssembly components and wasmCloud clusters.
The Console can authenticate using OIDC, meaning that platform developers can separate concerns: dev teams can use ordinary single sign-on (SSO) to access the Console without needing credentials for Kubernetes.
The Console UI is bundled with Cosmonic Control but is not required to use the system.