Skip to content
kix /docs
Install the CLI

How-to guide Debug dependency wiring

Inspect an instance's deps, parts, and out

Inspect an instance's rendered resources, dependency edges, package parts, and exported values.

Use the CLI for the rendered resource inventory and dependency graph. Use nix eval when you need the package author’s raw parts or exported out attributes.

Start with kix inspect:

kix-examples/ offline capture
❱ kix inspect how-to-application
Show outputHide output · 40 lines
Cluster: how-to-application
Total resources: 17

Namespaces (3):
  (cluster-scoped) (5 resources)
  how-to-app (10 resources)
  kube-system (2 resources)

Resource kinds:
 Kind                      Count 
 PackageInstance           4     
 ConfigMap                 3     
 CustomResourceDefinition  2     
 Deployment                2     
 Namespace                 2     
 Service                   2     
 Activation                1     
 Job                       1     

Resources:
  (cluster-scoped):
    Activation/how-to-application-pwzvpn447s7d
    CustomResourceDefinition/activations.kix.run
    CustomResourceDefinition/packageinstances.kix.run
    Namespace/how-to-app
    Namespace/kube-system
  how-to-app:
    ConfigMap/preview
    ConfigMap/production
    ConfigMap/production-health-script
    Deployment/preview
    Deployment/production
    Job/production-health
    PackageInstance/preview
    PackageInstance/production
    Service/preview
    Service/production
  kube-system:
    PackageInstance/platform-dns
    PackageInstance/platform-storage

This output lists resources by namespace and kind. It does not show package parts, resolved dependency bindings, or out values.

Use kix graph to see the dependencies that affect deployment ordering:

kix-examples/ offline capture
❱ kix graph 08-namespace-deps --format tree
Show outputHide output · 70 lines
CustomResourceDefinition/activations.kix.run
└── Activation/08-namespace-deps-y50i580sy41b
CustomResourceDefinition/packageinstances.kix.run
├── PackageInstance/backend@platform
│   └── Activation/08-namespace-deps-y50i580sy41b
├── PackageInstance/platform-storage@kube-system (import)
│   └── Activation/08-namespace-deps-y50i580sy41b
├── PackageInstance/platform-dns@kube-system (import)
│   ├── Activation/08-namespace-deps-y50i580sy41b
│   └── Deployment/gateway@app
│       └── Service/gateway@app
│           └── PackageInstance/gateway@app
│               └── Activation/08-namespace-deps-y50i580sy41b
└── PackageInstance/gateway@app
    └── Activation/08-namespace-deps-y50i580sy41b
Namespace/app
├── Service/gateway@app
│   └── PackageInstance/gateway@app
│       └── Activation/08-namespace-deps-y50i580sy41b
├── ConfigMap/gateway@app
│   └── Deployment/gateway@app
│       └── Service/gateway@app
│           └── PackageInstance/gateway@app
│               └── Activation/08-namespace-deps-y50i580sy41b
├── PackageInstance/gateway@app
│   └── Activation/08-namespace-deps-y50i580sy41b
└── Deployment/gateway@app
    └── Service/gateway@app
        └── PackageInstance/gateway@app
            └── Activation/08-namespace-deps-y50i580sy41b
Namespace/kube-system
├── PackageInstance/platform-storage@kube-system (import)
│   └── Activation/08-namespace-deps-y50i580sy41b
└── PackageInstance/platform-dns@kube-system (import)
    ├── Activation/08-namespace-deps-y50i580sy41b
    └── Deployment/gateway@app
        └── Service/gateway@app
            └── PackageInstance/gateway@app
                └── Activation/08-namespace-deps-y50i580sy41b
Namespace/platform
├── Service/backend@platform
│   ├── ConfigMap/gateway@app
│   │   └── Deployment/gateway@app
│   │       └── Service/gateway@app
│   │           └── PackageInstance/gateway@app
│   │               └── Activation/08-namespace-deps-y50i580sy41b
│   └── PackageInstance/backend@platform
│       └── Activation/08-namespace-deps-y50i580sy41b
├── ConfigMap/backend@platform
│   └── Deployment/backend@platform
│       └── Service/backend@platform
│           ├── ConfigMap/gateway@app
│           │   └── Deployment/gateway@app
│           │       └── Service/gateway@app
│           │           └── PackageInstance/gateway@app
│           │               └── Activation/08-namespace-deps-y50i580sy41b
│           └── PackageInstance/backend@platform
│               └── Activation/08-namespace-deps-y50i580sy41b
├── PackageInstance/backend@platform
│   └── Activation/08-namespace-deps-y50i580sy41b
└── Deployment/backend@platform
    └── Service/backend@platform
        ├── ConfigMap/gateway@app
        │   └── Deployment/gateway@app
        │       └── Service/gateway@app
        │           └── PackageInstance/gateway@app
        │               └── Activation/08-namespace-deps-y50i580sy41b
        └── PackageInstance/backend@platform
            └── Activation/08-namespace-deps-y50i580sy41b
16 resources, 27 dependencies

The graph is built from rendered manifests. It includes references carried by resource values and explicit requires or extraDeps edges. A package build argument by itself does not create an edge; the edge appears when a resource uses an output from that dependency.

Use JSON when you need to filter the graph by resource fields:

kix-examples/
❱ kix graph how-to-application --format json | jq '.nodes[] | select(.namespace == "how-to-app" and .name == "production")'

buildCluster exposes evaluated instances under legacyPackages.<system>.kixClusters. The instance’s raw attribute is the parts attrset returned by its package build function.

List the parts without forcing every resource into JSON:

kix-examples/
❱ system=$(nix eval --impure --raw --expr builtins.currentSystem)
❱ nix eval --json ".#legacyPackages.${system}.kixClusters.how-to-application" --apply 'cluster: builtins.attrNames cluster.instances."how-to-app".production.raw'

For the example instance, the result includes content, deployment, service, healthCheck, and root. Use a quoted attribute name whenever a namespace or instance name contains a hyphen.

List the public values on the package root:

kix-examples/
❱ system=$(nix eval --impure --raw --expr builtins.currentSystem)
❱ nix eval --json ".#legacyPackages.${system}.kixClusters.how-to-application" --apply 'cluster: builtins.attrNames cluster.instances."how-to-app".production.out'

Then evaluate one serializable value directly:

kix-examples/
❱ system=$(nix eval --impure --raw --expr builtins.currentSystem)
❱ nix eval --raw ".#legacyPackages.${system}.kixClusters.how-to-application" --apply 'cluster: cluster.instances."how-to-app".production.out.name'

Some out attributes are functions or carry Nix string context, so the whole attrset may not serialize. List its keys first, then evaluate the scalar value you need.