CLI

CLI Command Reference

Complete command reference for kubeadapt. Covers clusters, workloads, nodes, recommendations, cost breakdowns, namespaces, and persistent volumes.

All commands query Kubernetes cluster data via the Kubeadapt API and support the global flags (--output, --api-key, --verbose, etc.).

Quick reference

CommandDescription
get overviewOrganization-level summary (clusters, workloads, costs)
get dashboardOrganization dashboard summary
get clustersList all clusters
get cluster [id]Single cluster details
get workloadsWorkloads with cost and efficiency data
get nodesNode list with resource info
get node-groupsNode groups per cluster
get recommendationsRightsizing and optimization suggestions
get costs teamsCost breakdown by team label
get costs departmentsCost breakdown by department label
get namespacesNamespaces with team/department filters
get persistent-volumesPVs by cluster, namespace, or storage class
auth loginStore API key
auth statusShow stored credentials (masked)
auth logoutRemove stored API key
versionBinary version, commit, OS/arch
completionShell completion scripts

get overview

Shows an organization-level summary including total clusters, workloads, and cost figures.

bash
kubeadapt get overview

No additional flags.


get dashboard

Shows an organization dashboard with hero metrics, MTD spending, and top clusters.

Example

bash
kubeadapt get dashboard

get clusters

Lists all clusters in your organization.

bash
kubeadapt get clusters

No additional flags.

Example

bash
kubeadapt get clusters -o json

get cluster

Shows details for a single cluster. Requires the cluster ID as a positional argument.

Arguments

ArgumentRequiredDescription
cluster-idyesThe cluster ID to look up

Example

bash
kubeadapt get cluster cls-abc123

get workloads

Lists workloads across your clusters. You can filter by cluster, namespace, or workload kind.

Flags

FlagTypeDefaultDescription
--cluster-idstringFilter by cluster ID
--namespacestringFilter by namespace
--kindstringFilter by kind (e.g. Deployment, StatefulSet)
--limitintMaximum number of results to return
--offsetintNumber of results to skip (for pagination)

Example

bash
kubeadapt get workloads --cluster-id cls-abc123 --namespace default

Sample output:

text
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.43

See API: Workloads for the full response schema.


get nodes

Lists nodes in your clusters.

Flags

FlagTypeDefaultDescription
--cluster-idstringFilter by cluster ID
--node-groupstringFilter by node group name
--limitintMaximum number of results to return
--offsetintNumber of results to skip

Example

bash
kubeadapt get nodes --cluster-id cls-abc123

get node-groups

Lists node groups for your clusters.

Flags

FlagTypeDefaultDescription
--cluster-idstringFilter by cluster ID

Example

bash
kubeadapt get node-groups --cluster-id cls-abc123

get recommendations

Lists optimization recommendations. Filter by type and status to narrow results.

Flags

FlagTypeDefaultDescription
--cluster-idstringFilter by cluster ID
--typestringRecommendation type (e.g. rightsizing)
--statusstringFilter by status: pending, applied, or dismissed
--limitintMaximum number of results to return
--offsetintNumber of results to skip

Example

bash
kubeadapt get recommendations --type rightsizing --status pending

Sample output:

text
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.20

See Right-sizing for how recommendations are generated.


get costs teams

Shows cost breakdown by team.

Flags

FlagTypeDefaultDescription
--cluster-idstringFilter by cluster ID

Example

bash
kubeadapt get costs teams -o json

Sample table output:

text
TEAM NAMESPACES WORKLOADS PODS CPU MEMORY $/HR $/MO platform 4 12 28 14.2 52.8 GB $2.84 $2,044.80 backend 3 8 15 8.6 32.0 GB $1.72 $1,238.40 data 2 5 10 24.0 96.0 GB $4.80 $3,456.00

See Cost Attribution for how costs are calculated per team.


get costs departments

Shows cost breakdown by department.

Flags

FlagTypeDefaultDescription
--cluster-idstringFilter by cluster ID

Example

bash
kubeadapt get costs departments

get namespaces

Lists namespaces. You can filter by team or department label.

Flags

FlagTypeDefaultDescription
--cluster-idstringFilter by cluster ID
--teamstringFilter by team name
--departmentstringFilter by department name

Example

bash
kubeadapt get namespaces --team platform

get persistent-volumes

Lists persistent volumes. The alias pvs is also accepted.

Flags

FlagTypeDefaultDescription
--cluster-idstringFilter by cluster ID
--namespacestringFilter by namespace
--storage-classstringFilter by storage class name

Example

bash
kubeadapt get pvs --storage-class gp3

See Storage Analysis for PV cost details in the dashboard.


auth

Manages stored credentials. See Authentication for full details.

SubcommandDescription
auth loginPrompts for API key, saves to config file
auth statusShows the currently stored API key (masked) and API URL
auth logoutRemoves the stored API key from the config file

version

Prints the binary version, commit hash, build date, Go version, and OS/architecture.

bash
kubeadapt version

Example output:

text
kubeadapt v0.5.0 Commit: a1b2c3d Built: 2026-03-11T10:00:00Z Go version: go1.26.0 OS/Arch: darwin/arm64

completion

Generates shell completion scripts. See Shell completions for setup instructions per shell.

bash
kubeadapt completion [bash|zsh|fish|powershell]