Skip to main content
The kubernetes command group (alias: k8s) manages Kubernetes cluster connections and lets you inspect workloads, namespaces, pods, services, and resource statistics.

kubernetes list

List all registered Kubernetes clusters:
infraudit kubernetes list
infraudit k8s clusters
Example output:
ID  NAME         STATUS   NODES   NAMESPACES   LAST SYNC
--  ----         ------   -----   ----------   ---------
1   production   active   5       12           3 minutes ago
2   staging      active   2       8            1 hour ago

kubernetes register

Register a Kubernetes cluster using a kubeconfig file:
infraudit k8s register --name production --kubeconfig ~/.kube/config
FlagDescription
--nameDisplay name for the cluster
--kubeconfigPath to the kubeconfig file

kubernetes scan

Run a security and configuration scan against a registered cluster: Synopsis:
infraudit kubernetes scan <cluster-id>
infraudit k8s scan <cluster-id>
Example:
infraudit kubernetes scan 1

kubernetes sync

Sync the resource inventory for a cluster:
infraudit k8s sync 1

kubernetes resources

List all resources in a cluster: Synopsis:
infraudit kubernetes resources <cluster-id>
Example:
infraudit kubernetes resources 1

Workload inspection

The following subcommands let you inspect specific resource types within a cluster:

Namespaces

infraudit k8s namespaces 1

Deployments

infraudit k8s deployments 1

Pods

infraudit k8s pods 1

Services

infraudit k8s services 1

Cluster stats

Show an aggregate summary of resource counts and health across all clusters:
infraudit k8s stats

kubernetes delete

Remove a cluster from InfraAudit. Historical data is retained; the cluster is no longer scanned:
infraudit k8s delete 1
Registering a Kubernetes cluster requires that InfraAudit can reach the cluster API server from wherever the CLI is running. In-cluster deployments may require additional network configuration.