---
title: "Get Started | Cosmonic"
description: "Install Cosmonic Control on any Kubernetes cluster in minutes."
canonical: "https://cosmonic.com/docs/install-cosmonic-control/"
---

# Get Started

Cosmonic Control runs on any Kubernetes cluster. This guide walks through installing Cosmonic Control and deploying your first workload.

For production deployments, see the [Operator Manual](https://cosmonic.com/docs/operations/deploying-to-cosmonic-control/) or a [platform-specific deployment guide](https://cosmonic.com/docs/deployment-guides/cosmonic-control-on-vmware-vsphere-kubernetes-service/).

> **Get started for free**
>
> Cosmonic Control is free to get started. For enterprise use with unlimited HTTPTriggers per namespace, the `Project` grouping type, and the `Artifact` pre-fetch controller, [contact us](mailto:support@cosmonic.com).

## Prerequisites

- [`kubectl`](https://kubernetes.io/releases/download/)
- [Helm](https://helm.sh/docs) v3.8.0+
- A Kubernetes cluster running v1.24.0 or newer, or one you create in the next step

## 1. Set up a cluster

Select your Kubernetes environment:

**Existing cluster**

If you already have a Kubernetes cluster, skip cluster creation. Verify your `kubectl` context is pointing to the right cluster:

```shell
kubectl cluster-info
```

**k3d**

[k3d](https://k3d.io/) runs a lightweight [k3s](https://k3s.io/) cluster inside Docker. It starts in seconds and uses minimal resources.

**Requirements:** [Docker](https://docs.docker.com/get-started/get-docker/) · [k3d](https://k3d.io/#installation)

Map host ports 80 and 443 to the Cosmonic Control Traefik NodePorts (30080 and 30443), and disable k3s's built-in Traefik so it does not conflict with the chart's:

```shell
k3d cluster create cosmonic \
  --port "80:30080@loadbalancer" \
  --port "443:30443@loadbalancer" \
  --k3s-arg "--disable=traefik@server:0"
```

**k3s**

[k3s](https://k3s.io/) is a single-binary Kubernetes distribution with no container runtime dependency. **Linux only.**

Install k3s with its built-in Traefik disabled (the Cosmonic Control chart deploys its own):

```shell
curl -sfL https://get.k3s.io | sh -s - --disable=traefik
```

Configure `kubectl` to use the k3s cluster:

```shell
mkdir -p ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sudo chown $USER ~/.kube/config
```

**kind**

[kind](https://kind.sigs.k8s.io/) runs Kubernetes nodes as Docker containers.

**Requirements:** [Docker](https://docs.docker.com/get-started/get-docker/) · [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)

Create a cluster that maps host ports 80 and 443 to the Cosmonic Control Traefik NodePorts (30080 and 30443):

```shell
cat <<EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  extraPortMappings:
  - containerPort: 30080
    hostPort: 80
    protocol: TCP
  - containerPort: 30443
    hostPort: 443
    protocol: TCP
EOF
```

## 2. Install Cosmonic Control

The Cosmonic Control charts come with two **profiles**, sets of Helm values sized for a kind of cluster:

- The **high availability (HA) profile** is the chart default. It runs three replicas of Nexus (Control's built-in NATS server) with a PersistentVolumeClaim each, two operators, two Envoys, two Traefiks and three hosts, spread across nodes. It needs at least three schedulable nodes and a default StorageClass. See [High Availability](https://cosmonic.com/docs/operations/high-availability/).
- The **local profile** runs one replica of everything, so it fits on a single node such as a kind, k3d or k3s cluster. It ships inside each chart as `values.local.yaml`. It is for trials, demos and development: it is not highly available, and Nexus keeps no data across a restart.

**Existing cluster**

Check that the cluster has three or more schedulable nodes and a StorageClass marked `(default)`:

```shell
kubectl get nodes
kubectl get storageclass
```

If it does, install with the chart defaults, the HA profile. The chart deploys Traefik as the edge proxy:

```shell
helm install cosmonic-control oci://ghcr.io/cosmonic/cosmonic-control \
  --version 0.16.0 \
  --namespace cosmonic-system \
  --create-namespace
```

On a smaller cluster, pull the charts and install with the local profile instead, as the k3d, k3s and kind tabs show. The default profile does not work on fewer than three nodes: Nexus never becomes ready, so nothing else does either.

**k3d**

Pull both charts. The local profile ships inside each one:

```shell
helm pull oci://ghcr.io/cosmonic/cosmonic-control --version 0.16.0 --untar
helm pull oci://ghcr.io/cosmonic/cosmonic-control-hostgroup --version 0.16.0 --untar
```

Install with the local profile. The chart deploys Traefik as the edge proxy:

```shell
helm install cosmonic-control oci://ghcr.io/cosmonic/cosmonic-control \
  --version 0.16.0 \
  --namespace cosmonic-system \
  --create-namespace \
  -f cosmonic-control/values.local.yaml
```

**k3s**

Pull both charts. The local profile ships inside each one:

```shell
helm pull oci://ghcr.io/cosmonic/cosmonic-control --version 0.16.0 --untar
helm pull oci://ghcr.io/cosmonic/cosmonic-control-hostgroup --version 0.16.0 --untar
```

Install with the local profile. The chart deploys Traefik as the edge proxy:

```shell
helm install cosmonic-control oci://ghcr.io/cosmonic/cosmonic-control \
  --version 0.16.0 \
  --namespace cosmonic-system \
  --create-namespace \
  -f cosmonic-control/values.local.yaml
```

**kind**

Pull both charts. The local profile ships inside each one:

```shell
helm pull oci://ghcr.io/cosmonic/cosmonic-control --version 0.16.0 --untar
helm pull oci://ghcr.io/cosmonic/cosmonic-control-hostgroup --version 0.16.0 --untar
```

Install with the local profile. The chart deploys Traefik as the edge proxy:

```shell
helm install cosmonic-control oci://ghcr.io/cosmonic/cosmonic-control \
  --version 0.16.0 \
  --namespace cosmonic-system \
  --create-namespace \
  -f cosmonic-control/values.local.yaml
```

> **Pre-configure ingress hosts**
>
> To auto-create a Traefik `Ingress` for one or more workload hosts at install time, add `ingress.hosts` to the `helm install` command above. This skips the manual `kubectl apply` of an `Ingress` in step 3:
>
> ```shell
> --set 'ingress.hosts[0].host=welcome-tour.localhost.cosmonic.sh'
> ```
>
> See [Ingress and Workloads](https://cosmonic.com/docs/operations/ingress-and-workloads/#traefik-default) for the full pattern.

**Existing cluster**

Traefik is exposed on `NodePort` 30080 (http) and 30443 (https) inside the cluster. To reach it externally on a cloud cluster, either:

- Patch the Traefik Service to `LoadBalancer` so the cloud provisions an LB:

  ```shell
  kubectl patch svc traefik -n cosmonic-system -p '{"spec":{"type":"LoadBalancer"}}'
  ```
- Or front the Traefik NodePorts with an existing cloud or in-cluster load balancer.

For other ingress topologies (Istio, or exposing Envoy directly without the edge proxy), see [Ingress and Workloads](https://cosmonic.com/docs/operations/ingress-and-workloads/).

**k3d**

The host ports configured during cluster creation already forward to Traefik's NodePorts. No extra steps are needed.

**k3s**

Traefik's NodePorts (30080/30443) are reachable directly on the node. To reach Traefik on host port 80 instead, patch the Service to `LoadBalancer` and let k3s's built-in `klipper-lb` claim the host port:

```shell
kubectl patch svc traefik -n cosmonic-system -p '{"spec":{"type":"LoadBalancer"}}'
```

**kind**

The `extraPortMappings` configured during cluster creation already forward host 80 and 443 to Traefik's NodePorts. No extra steps are needed.

Wait for all components to be ready:

```shell
kubectl rollout status deploy -l app.kubernetes.io/instance=cosmonic-control -n cosmonic-system
```

With the HA profile (the Existing cluster tab with three or more nodes), Nexus runs as a StatefulSet rather than a Deployment, so wait for it too. Skip this with the local profile, where Nexus is a Deployment that the command above already covers:

```shell
kubectl rollout status statefulset/nexus -n cosmonic-system
```

Install a HostGroup with the same profile as the control plane:

**Existing cluster**

```shell
helm install hostgroup oci://ghcr.io/cosmonic/cosmonic-control-hostgroup \
  --version 0.16.0 \
  --namespace cosmonic-system
```

If you installed the control plane with the local profile, add `-f cosmonic-control-hostgroup/values.local.yaml`.

**k3d**

```shell
helm install hostgroup oci://ghcr.io/cosmonic/cosmonic-control-hostgroup \
  --version 0.16.0 \
  --namespace cosmonic-system \
  -f cosmonic-control-hostgroup/values.local.yaml
```

**k3s**

```shell
helm install hostgroup oci://ghcr.io/cosmonic/cosmonic-control-hostgroup \
  --version 0.16.0 \
  --namespace cosmonic-system \
  -f cosmonic-control-hostgroup/values.local.yaml
```

**kind**

```shell
helm install hostgroup oci://ghcr.io/cosmonic/cosmonic-control-hostgroup \
  --version 0.16.0 \
  --namespace cosmonic-system \
  -f cosmonic-control-hostgroup/values.local.yaml
```

```shell
kubectl rollout status deploy -l app.kubernetes.io/instance=hostgroup -n cosmonic-system
```

The hosts connect to Nexus over TLS and prove who they are with Kubernetes ServiceAccount tokens, with nothing to configure. See [Nexus Authentication and TLS](https://cosmonic.com/docs/operations/nexus-auth-and-tls/).

### GPU workloads

For workloads that import `wasi:webgpu/webgpu@0.0.1`, add `--set gpu=true` to the HostGroup install command so the host advertises the WebGPU interface. Without it, the workload sticks at `WORKLOAD_STATE_ERROR` because `hostInterfaces` acts as a scheduling filter: declaring an interface the host does not advertise prevents placement, not just linking.

The host pod must run on a node with a usable GPU exposed to it (Metal, Vulkan, or DX12 via `wgpu`); on managed clusters this typically means a GPU node pool plus the appropriate device-plugin daemonset.

### Override the host image for testing pre-release builds

The hostgroup chart pulls `ghcr.io/cosmonic/control-host:<appVersion>` by default. To run a pre-release build (for example, `canary` published from `cosmonic/control` `main`), override `image.tag`. `--reuse-values` keeps the values you installed with, including the profile:

```shell
helm upgrade hostgroup oci://ghcr.io/cosmonic/cosmonic-control-hostgroup \
  --version 0.16.0 \
  --namespace cosmonic-system \
  --reuse-values \
  --set image.tag=canary
```

A pre-release host can expect a newer Nexus than the control chart runs, so test it against a control plane from the same build.

### Turn up operator logs when triaging

The Cosmonic Control operator defaults to `info`-level logs. Set `operator.logLevel=debug` for verbose reconciliation traces:

```shell
helm upgrade cosmonic-control oci://ghcr.io/cosmonic/cosmonic-control \
  --version 0.16.0 \
  --namespace cosmonic-system \
  --reuse-values \
  --set operator.logLevel=debug
```

Valid values: `debug`, `info`, `warn`, `error`. Useful for live troubleshooting; the verbosity isn't typically helpful in steady state.

### Trusting a private CA

The `caBundle` values mount a PEM bundle into a pod's system trust store, so a process that reads the system trust store can validate TLS against an internal or private CA. Declare the bundle once at the chart level and opt individual components in:

```shell
helm upgrade cosmonic-control oci://ghcr.io/cosmonic/cosmonic-control \
  --version 0.16.0 \
  --namespace cosmonic-system \
  --reuse-values \
  --set-file caBundle.contents=/path/to/bundle.pem \
  --set operator.caBundleEnabled=true
```

The hostgroup chart has a single-component equivalent under `caBundle.enabled`. `caBundle.contents` (inline PEM), `caBundle.existingConfigMap`, and `caBundle.existingSecret` are mutually exclusive; pick whichever fits your trust-store source (e.g. a `trust-manager` Bundle target). Only opted-in pods restart on rotation.

**Image pulls trust the bundle too.** The host's OCI client validates registry TLS against its own built-in roots rather than the mounted system trust store, so enabling `caBundle` on the hostgroup chart also renders the host's `--oci-ca-path`. That is what makes a registry fronted by a private CA (for example an in-cluster Harbor) trusted for image pulls, for workload components and host component plugins alike.

## 3. Deploy a workload

Deploy `welcome-tour` to verify everything is working end-to-end:

```shell
helm install welcome-tour --version 0.2.0 \
  oci://ghcr.io/cosmonic-labs/charts/http-trigger \
  -f https://raw.githubusercontent.com/cosmonic-labs/control-demos/refs/heads/main/welcome-tour/values.http-trigger.yaml
```

Wait for the workload's `READY` status to be `TRUE`:

```shell
kubectl get workloads
```

Create a Traefik `Ingress` so external traffic for the workload's host reaches Envoy:

```shell
cat <<EOF | kubectl apply -f -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: welcome-tour
  namespace: cosmonic-system
  annotations:
    traefik.ingress.kubernetes.io/router.entrypoints: web,websecure
spec:
  ingressClassName: traefik
  rules:
    - host: welcome-tour.localhost.cosmonic.sh
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: ingress
                port:
                  number: 80
EOF
```

Open [http://welcome-tour.localhost.cosmonic.sh](http://welcome-tour.localhost.cosmonic.sh) in your browser.

> **Note**
>
> `localhost.cosmonic.sh` is a public wildcard DNS entry that resolves to `127.0.0.1`, so no `/etc/hosts` edits are required. For cloud or remote clusters, use the Traefik `LoadBalancer` service's external IP with the `Host: welcome-tour.localhost.cosmonic.sh` header. For k3s without a `LoadBalancer` patch, append `:30080` to the URL.

## Next steps

- **Explore more examples** — browse the [Template Catalog](https://cosmonic.com/docs/template-catalog/) for additional Wasm component demos
- **Build your own component** — see the [wasmCloud Developer Guide](https://wasmcloud.com/docs/wash/developer-guide/) to build and publish a Wasm component
- **Deploy to production** — see the [Operator Manual](https://cosmonic.com/docs/operations/deploying-to-cosmonic-control/) for production-grade configuration, HostGroup scaling, and ingress setup

## Cleaning up

**Existing cluster**

```shell
helm uninstall welcome-tour
helm uninstall hostgroup -n cosmonic-system
helm uninstall cosmonic-control -n cosmonic-system
kubectl delete ns cosmonic-system
```

**k3d**

The fastest way to clean up is to delete the entire cluster:

```shell
k3d cluster delete cosmonic
```

To remove only the Cosmonic Control workloads while keeping the cluster:

```shell
helm uninstall welcome-tour
helm uninstall hostgroup -n cosmonic-system
helm uninstall cosmonic-control -n cosmonic-system
kubectl delete ns cosmonic-system
```

**k3s**

Remove the Cosmonic Control workloads:

```shell
helm uninstall welcome-tour
helm uninstall hostgroup -n cosmonic-system
helm uninstall cosmonic-control -n cosmonic-system
kubectl delete ns cosmonic-system
```

To remove k3s entirely:

```shell
sudo /usr/local/bin/k3s-uninstall.sh
```

**kind**

The fastest way to clean up is to delete the entire cluster:

```shell
kind delete cluster
```

To remove only the Cosmonic Control workloads while keeping the cluster:

```shell
helm uninstall welcome-tour
helm uninstall hostgroup -n cosmonic-system
helm uninstall cosmonic-control -n cosmonic-system
kubectl delete ns cosmonic-system
```

## Frequently asked questions

**Can I install the chart with a Helm 3 version prior to v3.8.0?**

In versions of Helm 3 prior to v3.8.0, OCI support was experimental. You can run `export HELM_EXPERIMENTAL_OCI=1` to enable it, but some OCI functionality may behave differently. See the [Helm documentation](https://helm.sh/docs/topics/registries/) for details.

**How do I mirror images to my own internal registry?**

Use the `global.image.registry` and `global.image.pullSecrets` Helm values to point to your registry. See the [Air-Gapped Installation](https://cosmonic.com/docs/operations/air-gapped-installation/) guide for a full example using [ORAS](https://oras.land/).

Last updated on **Nov 25, 2026** by **Eric Gregory**
