Kubernetes: wardn-tiny

Install Wardn on Kubernetes with one replica and a bundled Postgres, for a trial or a homelab.

wardn-tiny installs the control plane in one namespace: one server replica running every role, one web app pod, and a Postgres the chart runs for you on a persistent volume. It suits a trial or a homelab with up to about five clusters. Read Self-hosting first for what each part does.

The bundled Postgres is one pod on one volume, with no backups or failover. It is not a place for data you cannot lose. For that, use wardn-standard, or point this chart at your own database.

Before you start

  • A Kubernetes cluster and kubectl pointed at it.
  • Helm 3.8 or newer.
  • A default StorageClass, or a StorageClass name for postgres.bundled.storageClass.
  • A decision on where the operators that will connect to this Wardn run: in the same cluster, or in others. It decides the gateway settings.

Install

Install the chart

The release name wardn in the namespace wardn makes the resources below, such as the Service wardn-wardn-tiny-gateway. The gateway host lets an operator in the same cluster trust the gateway by its Service name.

helm install wardn oci://ghcr.io/future-pirate-king/charts/wardn-tiny \
  --namespace wardn --create-namespace \
  --set 'gateway.hosts={wardn-wardn-tiny-gateway.wardn.svc}' \
  --wait --timeout 8m

Sign-up is by invitation by default, so nobody can sign up on a new install. Create the first owner with one command, or add --set auth.signup=open to let people sign up themselves while you try Wardn.

Before anything else starts, a hook Job makes the keys the install needs, in the Secret wardn-wardn-tiny-secrets:

KeyWhat it is
better-auth-secretSigns sign-in sessions. The web app and the server share it.
secret-master-keyThe secret store's age key. It protects the secrets Wardn stores, such as repository credentials.
postgres-passwordThe bundled database's password.

The Job only creates the Secret when it does not exist. An upgrade keeps it, and helm uninstall leaves it behind, so a reinstall can read the data that is still on the volume.

Back up the keys Secret

kubectl -n wardn get secret wardn-wardn-tiny-secrets -o yaml > wardn-tiny-secrets.yaml

Store the file somewhere safe and private. Without secret-master-key, the secrets stored in Wardn cannot be opened again.

Open the web app and sign up

kubectl -n wardn port-forward svc/wardn-wardn-tiny-web 3002:80

Open http://localhost:3002. If you made the first owner, open the setup link and set a password. If you installed with auth.signup=open, sign up and you start in a personal organization. See Sign-up modes.

Connect a cluster

With an API token from the web app, connect the same cluster:

export WARDN_API_URL=http://localhost:3002
export WARDN_TOKEN=wrd_...
wardn cluster connect --create --name homelab \
  --gateway-url https://wardn-wardn-tiny-gateway.wardn.svc:8443

See Connect a cluster for what this installs, and wardn cluster for every flag.

What the chart creates

For the release wardn:

ObjectNameNotes
Deploymentwardn-wardn-tiny-serverOne replica, all roles. Ports 8080 (API), 8443 (gateway), 9090 (ops).
Servicewardn-serverThe API and ops ports. The name is fixed because the web image forwards /api/v1 to it, so install one Wardn per namespace.
Servicewardn-wardn-tiny-gatewayClusterIP, TCP passthrough on 8443.
Deployment and Servicewardn-wardn-tiny-webOne replica. The Service listens on port 80. An init container creates the sign-in tables.
StatefulSet and Servicewardn-wardn-tiny-postgresPostgres 18 with a 5 GiB volume. Only when postgres.mode is bundled.
Secretwardn-wardn-tiny-secretsMade by the hook Job when secrets.generate is true. Kept by helm uninstall.
Ingresswardn-wardn-tinyOnly when ingress.enabled is true.

The server and web pods run as non-root users. The server container also has a read-only root filesystem and drops every Linux capability.

Reach it by a name

Set the address people open as publicUrl, with no trailing slash, and turn on the ingress. publicUrl becomes the web app's base URL and the only origin the server accepts browser calls from.

helm upgrade wardn oci://ghcr.io/future-pirate-king/charts/wardn-tiny -n wardn --reuse-values \
  --set publicUrl=https://wardn.example.com \
  --set ingress.enabled=true \
  --set ingress.host=wardn.example.com \
  --set ingress.tlsSecret=wardn-web-tls

The ingress sends everything to the web app, which forwards /api/v1 to the server. Use ingress.className and ingress.annotations for your ingress controller, for example to have cert-manager issue wardn-web-tls.

The gateway

Operators connect to the gateway Service over mutual TLS. In wardn-tiny it is a ClusterIP Service, which only the same cluster can reach.

  • Operators in the same cluster dial https://wardn-wardn-tiny-gateway.wardn.svc:8443. Put that name in gateway.hosts, as in the install command.

  • Operators in other clusters need an address they can reach. Make the Service a LoadBalancer or NodePort, point a DNS name at it, and add that name to gateway.hosts:

    helm upgrade wardn oci://ghcr.io/future-pirate-king/charts/wardn-tiny -n wardn --reuse-values \
      --set gateway.service.type=LoadBalancer \
      --set 'gateway.hosts={wardn-wardn-tiny-gateway.wardn.svc,gateway.example.com}'

    Operators in those clusters then dial https://gateway.example.com:8443.

A generated gateway certificate is signed when the server starts, so the restart that the upgrade causes gives it the new names. The gateway explains certificates, including bringing your own.

Use your own database

wardn-tiny can use an external Postgres instead of the bundled one. Put the password in a Secret, then switch the mode:

kubectl -n wardn create secret generic wardn-db --from-literal=password='...'
helm upgrade wardn oci://ghcr.io/future-pirate-king/charts/wardn-tiny -n wardn --reuse-values \
  --set postgres.mode=external \
  --set postgres.external.host=db.example.com \
  --set postgres.external.passwordSecretRef.name=wardn-db

Switching the mode does not copy data from the bundled database. Copy it first with pg_dump and pg_restore (Backup and restore). Postgres covers the URL forms and TLS.

Upgrade and uninstall

helm upgrade wardn oci://ghcr.io/future-pirate-king/charts/wardn-tiny -n wardn --reuse-values --version 0.2.0

With one replica, the API is briefly unavailable while the new pod starts and runs migrations. Read Upgrading for the order across the control plane and the operators.

helm uninstall wardn -n wardn removes the workloads and keeps the Secret wardn-wardn-tiny-secrets and the database volume (the PersistentVolumeClaim data-wardn-wardn-tiny-postgres-0). Delete those yourself when you mean to throw the data away.

Next

On this page