CLI
CLI Command Reference
Complete command reference for kubeadapt: organization, clusters, namespaces, workloads, pods, nodes, node-groups, recommendations, teams, departments, and authentication.
All commands support the global flags (--output, --api-key, --verbose, etc.). List commands (get clusters, get workloads, etc.) also inherit the pagination flags.
Quick reference
| Command | Description |
|---|---|
get overview | Organization-level summary |
get dashboard | Organization dashboard with MTD cost and savings |
get clusters | List clusters |
get cluster <id> | Show a single cluster |
get namespaces | List namespaces |
get namespace <name> | Show a single namespace |
get workloads | List workloads |
get workload <uid> | Show a single workload |
get pods <workload-uid> | List pods for a workload |
get nodes | List nodes |
get node <uid> | Show a single node |
get node-groups | List node groups |
get node-group <name> | Show a single node group |
get recommendations | List recommendations |
get recommendation <id> | Show a single recommendation |
get teams | List teams with cost attribution |
get team <id> | Show a single team |
get team-assignments <id> | List assignments for a team |
get departments | List departments with cost attribution |
get department <id> | Show a single department |
health | Check API server health (unauthenticated) |
auth login | Store API key |
auth status | Show stored credentials (masked) |
auth logout | Remove stored API key |
version | Binary version, commit, OS/arch |
completion | Shell completion scripts |
Pagination flags
All list commands (get clusters, get workloads, etc.) inherit these flags from the get parent:
| Flag | Type | Default | Description |
|---|---|---|---|
--cost-mode | string | fully_loaded | Cost attribution mode (fully_loaded or workload_only). Applies to namespace, workload, pod, team, and department commands. |
--cursor | string | — | Pagination cursor from a previous response. |
--limit | int | 100 | Page size (1–500). |
--paginate | bool | false | Automatically fetch all pages. |
--include-total | bool | false | Include total_count in pagination metadata. |
get overview
Shows an organization-level summary including total clusters, workloads, and cost figures.
kubeadapt get overviewNo additional flags.
get dashboard
Shows an organization dashboard with hero metrics, MTD spending, and top clusters.
Example
kubeadapt get dashboardget clusters
Lists all clusters in your organization.
kubeadapt get clustersNo additional flags.
Example
kubeadapt get clusters -o jsonget cluster
Shows details for a single cluster. Requires the cluster ID as a positional argument.
Arguments
| Argument | Required | Description |
|---|---|---|
cluster-id | yes | The cluster ID to look up |
Example
kubeadapt get cluster c1a2b3c4-d5e6-7890-abcd-ef1234567890get workloads
Lists workloads across your clusters. You can filter by cluster, namespace, or workload kind.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--cluster-id | string | Filter by cluster ID | |
--namespace | string | Filter by namespace | |
--kind | string | Filter by kind (e.g. Deployment, StatefulSet) | |
--limit | int | Maximum number of results to return | |
--offset | int | Number of results to skip (for pagination) |
Example
kubeadapt get workloads --cluster-id c1a2b3c4-d5e6-7890-abcd-ef1234567890 --namespace defaultSample output:
NAME KIND NAMESPACE CLUSTER REPLICAS EFFICIENCY MONTHLY $ $/HR
api-gateway Deployment payments production 3/3 34.2% $128.40 $0.18
redis-primary StatefulSet cache production 1/1 72.8% $45.60 $0.06
worker Deployment jobs production 5/5 18.1% $312.00 $0.43See API: Workloads for the full response schema.
get workload
kubeadapt get workload <workload-uid>
Shows a single workload by its Kubernetes metadata.uid.
Arguments
| Argument | Description |
|---|---|
workload-uid | Kubernetes metadata.uid of the workload (required) |
Example
kubeadapt get workload b9f1a342-7c5e-4d8a-9e2b-1234567890abget pods
kubeadapt get pods <workload-uid>
Lists pods belonging to a workload.
Arguments
| Argument | Description |
|---|---|
workload-uid | Kubernetes metadata.uid of the parent workload (required) |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--namespace | string (repeatable) | — | Filter by namespace |
--node-uid | string (repeatable) | — | Filter by node UID |
--phase | string | — | Filter by pod phase (Pending, Running, Succeeded, Failed, Unknown) |
--qos-class | string | — | Filter by QoS class (Guaranteed, Burstable, BestEffort) |
--has-hostpath | bool | false | Filter pods with hostPath volumes |
--has-emptydir | bool | false | Filter pods with emptyDir volumes |
--host-network | bool | false | Filter pods with hostNetwork enabled |
Example
kubeadapt get pods b9f1a342-7c5e-4d8a-9e2b-1234567890ab --phase Runningget nodes
Lists nodes in your clusters.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--cluster-id | string | Filter by cluster ID | |
--node-group | string | Filter by node group name | |
--limit | int | Maximum number of results to return | |
--offset | int | Number of results to skip |
Example
kubeadapt get nodes --cluster-id c1a2b3c4-d5e6-7890-abcd-ef1234567890get node
kubeadapt get node <node-uid>
Shows a single node by its Kubernetes metadata.uid.
Arguments
| Argument | Description |
|---|---|
node-uid | Kubernetes metadata.uid of the node (required) |
Example
kubeadapt get node n1a2b3c4-d5e6-7890-abcd-ef0987654321get node-groups
Lists node groups for your clusters.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--cluster-id | string | Filter by cluster ID |
Example
kubeadapt get node-groups --cluster-id c1a2b3c4-d5e6-7890-abcd-ef1234567890get node-group
kubeadapt get node-group <name>
Shows a single node group by name.
Arguments
| Argument | Description |
|---|---|
name | Node group name (required) |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--cluster-id | string | — | Cluster ID that owns the node group (required) |
Example
kubeadapt get node-group prod-mixed --cluster-id c1a2b3c4-d5e6-7890-abcd-ef1234567890get recommendations
Lists optimization recommendations. Filter by type and status to narrow results.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--cluster-id | string | Filter by cluster ID | |
--type | string | Recommendation type (e.g. rightsizing) | |
--status | string | Filter by status: pending, applied, or dismissed | |
--limit | int | Maximum number of results to return | |
--offset | int | Number of results to skip |
Example
kubeadapt get recommendations --type rightsizing --status pendingSample output:
ID TYPE CLUSTER RESOURCE PRIORITY STATUS MONTHLY SAVINGS
rec-a1b2 rightsizing production payments/api-gateway high pending $42.80
rec-c3d4 rightsizing production monitoring/prometheus medium pending $18.50
rec-e5f6 rightsizing production default/nginx-ingress low pending $6.20See Right-sizing for how recommendations are generated.
get recommendation
kubeadapt get recommendation <id>
Shows a single recommendation by ID.
Arguments
| Argument | Description |
|---|---|
id | Recommendation UUID (required) |
Example
kubeadapt get recommendation f47ac10b-58cc-4372-a567-0e02b2c3d479 -o jsonget teams
Lists teams with cost attribution.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--department-id | string (repeatable) | — | Filter by department ID |
--origin | string (repeatable) | — | Filter by origin: k8s (auto-discovered) or kubeadapt (created in dashboard) |
Example
kubeadapt get teams -o jsonget team
kubeadapt get team <team-id>
Shows a single team by ID.
Arguments
| Argument | Description |
|---|---|
team-id | Team UUID (required) |
Example
kubeadapt get team f47ac10b-58cc-4372-a567-0e02b2c3d479get team-assignments
kubeadapt get team-assignments <team-id>
Lists workload and namespace assignments for a team.
Arguments
| Argument | Description |
|---|---|
team-id | Team UUID (required) |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--entity-type | string | — | Filter by entity type (namespace, workload, cluster) |
--cluster-id | string (repeatable) | — | Filter by cluster ID |
--source | string | — | Filter by assignment source: k8s_label, user_manual, namespace_auto |
Example
kubeadapt get team-assignments f47ac10b-58cc-4372-a567-0e02b2c3d479 --entity-type workloadget departments
Lists departments with cost attribution.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--origin | string (repeatable) | — | Filter by origin: k8s (auto-discovered) or kubeadapt (created in dashboard) |
Example
kubeadapt get departmentsget department
kubeadapt get department <dept-id>
Shows a single department by ID.
Arguments
| Argument | Description |
|---|---|
dept-id | Department UUID (required) |
Example
kubeadapt get department a1b2c3d4-e5f6-7890-abcd-ef1234567890get namespaces
Lists namespaces.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--cluster-id | string | — | Filter by cluster ID |
--team | string | — | Filter by team name |
--department | string | — | Filter by department name |
Example
kubeadapt get namespaces --team platformget namespace
kubeadapt get namespace <name>
Shows a single namespace by name.
Arguments
| Argument | Description |
|---|---|
name | Kubernetes namespace name (required) |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--cluster-id | string | — | Cluster ID that owns the namespace (required) |
Example
kubeadapt get namespace payments --cluster-id c1a2b3c4-d5e6-7890-abcd-ef1234567890health
kubeadapt health
Checks API server health. No authentication required.
Example
kubeadapt healthauth
Manages stored credentials. See Authentication for full details.
| Subcommand | Description |
|---|---|
auth login | Prompts for API key, saves to config file |
auth status | Shows the currently stored API key (masked) and API URL |
auth logout | Removes the stored API key from the config file |
version
Prints the binary version, commit hash, build date, and OS/architecture.
kubeadapt versionExample output:
kubeadapt v0.5.0
Commit: a1b2c3d
Built: 2026-03-11T10:00:00Z
OS/Arch: darwin/arm64completion
Generates shell completion scripts. See Shell completions for setup instructions per shell.
kubeadapt completion [bash|zsh|fish|powershell]