Skip to content

List clusters and packages

This content is for the v0.1 version. Switch to the latest version for up-to-date documentation.

Use kix list to discover what a project exposes before choosing a cluster to check, build, or deploy. Run the commands from the directory containing the project’s flake.nix.

List every cluster registered with kix.lib.mkFlake:

Run in kix-examples/
❱ kix list clusters
 NAME                              
 02-hello-world                    
 06-service-dep                    
 08-namespace-deps                 
 09-typed-options                  
 10-reuse-packages                 
 19-scorecards                     
 how-to-adoption                   
 how-to-adoption-takeover          
 how-to-application                
 how-to-auto-instantiation         
 how-to-composition                
 how-to-fragments                  
 how-to-helm-bridge                
 how-to-multi-env                  
 how-to-package-cilium             
 how-to-package-monitoring         
 how-to-package-python             
 how-to-package-stackgres          
 how-to-package-storage            
 how-to-package-valkey             
 how-to-package-velero             
 how-to-package-victoria-metrics   
 how-to-platform-cloudflare-tunnel 
 how-to-platform-gateway           
 how-to-platform-hostpath          
 how-to-platform-ingress           
 how-to-platform-monitoring        
 how-to-platform-network-policy    
 how-to-platform-secrets           
 how-to-platform-sops              
 how-to-stateful-migration

The name in the first column is the value accepted by commands such as kix check, kix build, and kix deploy.

For a flake in another directory, pass its path explicitly:

❱ kix list clusters --flake ../infrastructure

The path may also be any flake reference accepted by Nix.

Select a cluster to see its evaluated package instances:

Run in kix-examples/
❱ kix list packages --cluster how-to-application
 NAME              VERSION  STATUS                 
 platform-dns      -        import [kube-system]   
 platform-storage  -        import [kube-system]   
 preview           1.0.0    installed [how-to-app] 
 production        1.0.0    installed [how-to-app]

The output identifies each instance by namespace and name, along with its package version. Imports supplied by the cluster flavor also appear in the list, even when they do not render resources managed by Kix.

Use this command when you need to confirm that:

  • An instance was included by the cluster modules.
  • A package has the version you expect.
  • Automatic or flavor-provided instances were added.
  • The namespace and instance names match a later command or dependency.

list packages is intentionally compact. Use inspect to see the rendered resource inventory:

Run in kix-examples/
❱ kix inspect how-to-application Show output
Cluster: how-to-application
Total resources: 16

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

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

Resources:
  (cluster-scoped):
    Activation/how-to-application-gb5d6ry45b5l
    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

Use graph when you need dependency edges. The evaluated cluster view exposes package parts and exported outputs.