CLI Overview
Query Kubernetes cluster costs, workloads, and optimization recommendations from your terminal. Table, JSON, and YAML output for scripts and CI.
kubeadapt is a command-line tool for querying Kubernetes cluster costs and optimization data via the Kubeadapt API. List clusters, inspect workloads, pull cost breakdowns by team or department, and fetch rightsizing recommendations directly from your terminal.
Output formats include table (default), JSON, and YAML, making it easy to integrate with scripts and CI pipelines.
bash
kubeadapt get clusters -o jsonWhat you can do
- Cost visibility: break down spending by cluster, namespace, team, or department
- Rightsizing recommendations: list pending, applied, or dismissed recommendations with estimated savings
- Workload inspection: view CPU/memory requests, efficiency scores, and per-workload costs
- Node and storage data: list nodes, node groups, and persistent volumes with cost info
- CI/CD integration: pipe JSON output to
jq, feed into scripts, or use in GitHub Actions workflows
Note
Requires a Kubeadapt account and API key. Generate one at app.kubeadapt.io or see Authentication.
Global flags
These flags apply to every command.
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--api-key | string | API key (overrides stored config) | ||
--api-url | string | API URL (overrides config) | ||
--config | string | ~/.kubeadapt/config.yaml | Config file path | |
--output | -o | string | table | Output format: table, json, yaml |
--no-color | bool | false | Disable colored output | |
--verbose | -v | bool | false | Enable debug logging |
Next steps
- Installation: install the binary via Homebrew, script, or from source
- Authentication: store your API key and connect to the API
- Command Reference: every command, flag, and example
- API Reference: the REST API that the CLI wraps