wardn clusters
List the clusters you can see with their status, and show one in detail.
wardn clusters lists the clusters registered in your Wardn and wardn clusters get shows one. Use them to find a cluster's id for wardn cluster connect, and to check that a freshly installed operator has joined. Set up the CLI first (CLI).
Both commands are read-only. They call the API as your token, so they list only the clusters your token may see, and need cluster:read (Who sees what).
wardn clusters
wardn clustersTakes no arguments and no flags beyond the global ones. It follows the API's pages until it has every cluster, then prints one row each:
NAME STATUS VERSION OPERATOR
prod-eu-1 healthy v1.31.2 0.1.0 (online)
staging-1 degraded v1.30.5 0.1.0 (online)
dev-1 disconnected — 0.1.0 (offline)
lab unknown — — (offline)| Column | Meaning |
|---|---|
NAME | The cluster's name. |
STATUS | disconnected if the cluster's link was ended or its operator has gone quiet. Otherwise paused if someone paused it in Wardn, which keeps it connected but applies nothing. Otherwise its health, which comes from its nodes: healthy when all are ready, degraded when some are, unhealthy when none is, and unknown until the cluster has reported. |
VERSION | The Kubernetes version the operator reported, or — before it has. |
OPERATOR | The operator's version, then (online) or (offline). — is shown for the version until an operator has joined. |
With nothing registered, or nothing visible to you, it prints no clusters registered.
wardn clusters get
wardn clusters get <name-or-id>Shows one cluster. The argument is its exact name or its id. An id (a UUID) is fetched directly; anything else is matched against the names in the list, so a name must be spelled exactly.
wardn clusters get prod-eu-1name: prod-eu-1
id: 6f0c2a1e-8d5b-4c3a-9e47-2b1f0a9c7d10
status: healthy
tier: production
cloud: aws eu-west-1
environment: 3b7a9c52-5d1e-4f08-a6c4-0e2d8b1f7a33
kubernetes: v1.31.2
nodes: 3/3 ready
operator: 0.1.0 (online)| Line | Meaning |
|---|---|
name, id | The cluster's name and id. Use the id with --cluster-id. |
status | As in the list. |
tier | production, staging or development. |
cloud | The cloud and region, as the operator reported them. They read unknown unknown until it has. |
environment | The id of the environment the cluster is in, or — for none. |
kubernetes | The Kubernetes version, or —. |
nodes | Nodes ready out of nodes in total. |
operator | The operator's version and whether it is connected. |
| Argument | Meaning |
|---|---|
<name-or-id> | Required. Exactly one. |
If no cluster matches, it stops with error: no cluster with that name or id: "<ref>" and exits with status 1.
Use it in a script
The output is meant for reading. To wait for an operator to join, poll the status and check for (online):
until wardn clusters get prod-eu-1 | grep -q 'operator:.*(online)'; do sleep 5; doneFor structured data, call the API: GET /api/v1/clusters returns each cluster with its health, operator and usage as JSON (API).
A cluster whose operator is (offline) keeps running what it last applied. Applies for it wait until the operator reconnects. See Failures and offline clusters.
Next
wardn cluster
Connect a Kubernetes cluster to Wardn with connect, revoke its credentials with disconnect, and remove the operator with uninstall.
wardn status, whoami and can-i
Check that the API answers, who your token acts as, and whether you hold a permission, before you try the thing that needs it.