Skip to content
Install the CLI

How-to guide Operate a cluster

Check cluster health

Use kix health to verify that every resource in the active activation can still find the resources it depends on.

Run health with the cluster name:

kix-examples/
❱ kix health how-to-application
Connecting to cluster...
Activation: how-to-application-6rhi3wpk9iml (hash: 6rhi3wpk9imlx73n8kbcwbmkxmry1744)
17 kix-managed resources on cluster

Packages:
  ✓ (cluster-level)                          7/7 resources healthy, 2 imported
  ✓ preview (how-to-app)                     3/3 resources healthy
  ✓ production (how-to-app)                  5/5 resources healthy

Health: 15 in-sync, 2 imported (3/3 packages healthy)

Kix reads the active activation and its managed resources directly from Kubernetes. It then follows their dependency identities and reports a summary for each package instance.

A healthy result exits with status 0. A missing dependency or a resource that depends on one exits with status 1.

Each package is assigned one of these states:

StateMeaning
healthyEvery required resource is present
externalThe package describes an imported resource
DEGRADEDA required resource is missing
AT RISKThe package depends directly or transitively on a broken resource

Run with -vv when you need to see the dependency traversal:

kix-examples/ live capture
❱ kix health how-to-application -vv
Show outputHide output · 39 lines
   0.000193372s DEBUG kix_core::eval::evaluator: evaluator created (no cache) flake=kix-examples
   0.007948240s DEBUG kix::cluster::client: apiserver reachable endpoint="https://127.0.0.1:37013/" version=v1.35.0
Connecting to cluster...
   0.015483860s DEBUG kix::cluster::client: apiserver reachable endpoint="https://127.0.0.1:37013/" version=v1.35.0
   0.032920293s DEBUG kix::cluster::discovery: API resources discovered count=60
   0.037389048s DEBUG kix::cluster::inventory: fetched resource=endpoints count=2
   0.040790236s DEBUG kix::cluster::inventory: fetched resource=namespaces count=2
   0.040866852s DEBUG kix::cluster::inventory: fetched resource=configmaps count=3
   0.044155675s DEBUG kix::cluster::inventory: fetched resource=services count=2
   0.045130153s DEBUG kix::cluster::inventory: fetched resource=deployments.apps count=2
   0.047164900s DEBUG kix::cluster::inventory: fetched resource=jobs.batch count=1
   0.053068354s DEBUG kix::cluster::inventory: fetched resource=customresourcedefinitions.apiextensions.k8s.io count=2
   0.054008736s DEBUG kix::cluster::inventory: fetched resource=endpointslices.discovery.k8s.io count=2
   0.056009363s DEBUG kix::cluster::inventory: fetched resource=packageinstances.kix.run count=4
   0.056417796s DEBUG kix::cluster::inventory: fetched resource=activations.kix.run count=1
Activation: how-to-application-6rhi3wpk9iml (hash: 6rhi3wpk9imlx73n8kbcwbmkxmry1744)
17 kix-managed resources on cluster
  → checking ConfigMap/preview@how-to-app (asa4ywz8)
  → checking CustomResourceDefinition/activations.kix.run (gvrlspcf)
  → checking Service/preview@how-to-app (91lbws8g)
  → checking Service/production@how-to-app (cd3l507f)
  → checking Namespace/how-to-app (8767b7nz)
  → checking ConfigMap/production-health-script@how-to-app (dlzbv1na)
  → checking PackageInstance/production@how-to-app (mclb0sk2)
  → checking Activation/how-to-application-6rhi3wpk9iml (6rhi3wpk)
  → checking Namespace/kube-system (sj0fv5bs)
  → checking Deployment/production@how-to-app (kr7i34wz)
  → checking ConfigMap/production@how-to-app (4x75h2z7)
  → checking PackageInstance/preview@how-to-app (84pfjn0k)
  → checking CustomResourceDefinition/packageinstances.kix.run (pk4hih6j)
  → checking Deployment/preview@how-to-app (hd2br513)
  → checking Job/production-health@how-to-app (4sa9i19d)

Packages:
  ✓ (cluster-level)                          7/7 resources healthy, 2 imported
  ✓ preview (how-to-app)                     3/3 resources healthy
  ✓ production (how-to-app)                  5/5 resources healthy

Health: 15 in-sync, 2 imported (3/3 packages healthy)

Pass --context when the cluster is not on the current kubectl context:

kix-examples/
❱ kix health how-to-application --context kind-kix-demo

health checks the active dependency graph already recorded in Kubernetes. It does not evaluate the local cluster definition, compare manifest fields, or test workload readiness.