Quickstart on kind
Install Wardn on a local kind cluster, connect it, deploy a sample app from git and update it with a push.
This runs the whole of Wardn on one local cluster: the control plane (the wardn-tiny chart) and the operator, in the same kind cluster. It takes about fifteen minutes and ends with a sample app deployed from a git repository, then updated by a push. Each step says why it is there; How it works has the full picture.
You need:
- Docker, kind, kubectl and Helm 3.8 or newer.
- The
wardnCLI (see CLI). - A public git repository you can push to, on GitHub or any other host that serves
https://.
wardn-tiny is for evaluation. It runs its own Postgres on a volume you cannot easily back up. For anything you care about, use wardn-standard.
Make a cluster
kind create cluster --name wardnkind names the kubeconfig context kind-wardn. The later steps use that name.
Install the control plane
The operator dials out to the control plane's gateway and checks the gateway's certificate. Here the operator runs in the same cluster, so it dials the gateway by its in-cluster Service name, and that name has to be one the certificate is valid for. gateway.hosts says so. The release name wardn makes the Service wardn-wardn-tiny-gateway.
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}' \
--set auth.signup=open \
--wait --timeout 8mauth.signup=open lets you sign up yourself on this trial. The default is invite, which admits only people with an invitation; see Sign-up modes. On first install the chart makes the keys Wardn needs and keeps them in a Secret called wardn-wardn-tiny-secrets, which helm uninstall leaves in place. See wardn-tiny for every value.
Sign up
kubectl -n wardn port-forward svc/wardn-wardn-tiny-web 3002:80Open http://localhost:3002 and sign up. You start in a personal organization of your own, and you are its Owner. Leave the port-forward running: the CLI and the API go through it too.
Make an API token
The CLI authenticates with an API token, not with your browser session. In the web app, open Settings › API tokens and choose New token. Under Access, give it cluster:register and cluster:manage on your organization, then choose Create token and copy the secret. It is shown once.
export WARDN_API_URL=http://localhost:3002
export WARDN_TOKEN=wrd_...
curl -fsS -H "Authorization: Bearer $WARDN_TOKEN" "$WARDN_API_URL/api/v1/me"The last command prints who the token acts as. See API tokens for ceilings and expiry.
Connect the cluster
--create registers the cluster, makes a one-time join token and installs the operator, in one command. The CLI uses your kubeconfig for the install only; it is never stored or sent.
wardn cluster connect --create --name kind --tier development \
--gateway-url https://wardn-wardn-tiny-gateway.wardn.svc:8443 \
--context kind-wardnIn a few seconds the cluster shows as connected under Clusters in the web app. Connect a cluster lists what was installed and why.
Give Wardn somewhere to deploy to
The operator never applies as itself. It applies as a service account named wardn-deployer in the deployment's namespace, so that account's RBAC is the limit of what Wardn can change. Make the namespace and the account, and let the account manage that namespace only:
kubectl create namespace hello
kubectl -n hello create serviceaccount wardn-deployer
kubectl -n hello create rolebinding wardn-deployer --clusterrole=admin --serviceaccount=hello:wardn-deployerPut a manifest in git
In your repository, make a manifests directory with this file, then commit and push it to main:
apiVersion: v1
kind: ConfigMap
metadata:
name: greeting
data:
hello: oneLeave out metadata.namespace. The operator puts namespaced objects that name none into the deployment's namespace.
Create the app and the deployment
An app says where manifests come from and how to render them. A deployment says where the app runs and how new versions arrive. See Sources and apps and Deployments.
- Open Deployments. On a fresh install the list is empty and offers New app. (The address is
/apps/new.) - Under Source, keep A new repository, choose Git repository, paste the repository's
https://URL and set Path tomanifests. Leave Credentials empty: the repository is public. - Under App, set Name to
helloand change Rendered with from its default, Helm, to Plain manifests. Choose Create app. - On the app's page, choose New deployment. Set Name to
hello, Runs on to Cluster, Cluster tokind, Namespace tohello, Snapshots arrive to Track a branch and Branch tomain. Choose Create deployment.
Deploy your first app does the same with a fuller example and shows each API call.
Watch it deploy
Wardn reads the head of main, renders it into a snapshot and sends it to the operator. Once the deployment shows Healthy:
kubectl -n hello get configmap greeting -o jsonpath='{.data.hello}'prints one. Now change hello: one to hello: two, commit and push. Without the GitHub App, Wardn looks at the branch once a minute, so within about a minute a new snapshot is rendered and applied, and the command prints two. The deployment's Snapshots tab lists both snapshots, and each one shows what changed.
If something does not happen
| What you see | Why, and what to do |
|---|---|
| The cluster stays disconnected. | The operator cannot reach the gateway, or the name it dials is not in gateway.hosts. Read kubectl -n wardn-system logs deploy/wardn-operator. |
| The deployment stays Waiting for a snapshot for more than two minutes. | The control plane could not read the repository. Check that the URL is https:// and public, and that Branch names a branch that exists. A new deployment is first picked up by the one-minute check, so allow a minute. |
| The deployment shows Apply failed with a message about permissions. | wardn-deployer is missing in hello, or has no rights there. Repeat the namespace step. |
| A snapshot is Held for review. | The render had no objects, for example because Path names a directory that does not exist or holds no .yaml, .yml or .json files directly. Correct the source's path with PUT /api/v1/sources/{sourceId}, or discard the snapshot. See Held snapshots. |
Clean up
kind delete cluster --name wardnNext
Deploy your first app
A Deployment, Service and ConfigMap, with health, from the web app and the API.
Drift
Change something in the cluster by hand and see what Wardn does.
Restore and rollback
Go back to the first snapshot, with the preflight.
Related: Sources and apps, Deployments, How it works.