KubeadaptDocsBack to site
Sign inStart free
DocsAPI ReferenceCLI
  • Overview
    • Installation
    • Authentication
    • Configuration
  • Commands
Docs homev1CliConfiguration

CLI

CLI Configuration

Configure kubeadapt with a YAML config file, environment variables, or command-line flags. Includes precedence rules and file permission details.


kubeadapt reads configuration from three sources: a YAML config file, environment variables, and command-line flags. When the same setting appears in multiple places, the highest-precedence source wins.

Config file

The default config file location is ~/.kubeadapt/config.yaml. You can point to a different file with the --config flag:

bash
kubeadapt --config /path/to/config.yaml get clusters

Format

yaml
api_url: "https://public-api.kubeadapt.io"
api_key: "ka_your_api_key"

File permissions

The config file is created automatically when you run kubeadapt auth login.

If you create the file manually, set the permissions yourself:

bash
chmod 0600 ~/.kubeadapt/config.yaml

Environment variables

Environment variables override values in the config file.

VariableConfig KeyDescription
KUBEADAPT_API_URLapi_urlAPI base URL
KUBEADAPT_API_KEYapi_keyAPI key for authentication

Precedence

When the same setting is defined in multiple places, this order applies (highest to lowest):

  1. Command-line flags (--api-key, --api-url)
  2. Environment variables (KUBEADAPT_API_KEY, KUBEADAPT_API_URL)
  3. Config file (~/.kubeadapt/config.yaml)
  4. Defaults (API URL defaults to http://localhost:8002)

For example, if api_url is set in your config file but you also export KUBEADAPT_API_URL, the environment variable takes effect. If you then pass --api-url on the command line, that takes effect over both.

Related

  • Authentication: login, logout, and credential storage
  • Command Reference: all available commands and flags
PreviousCLI AuthenticationCLINextCLI Command ReferenceCLI

On this page

  • Config file
  • Format
  • File permissions
  • Environment variables
  • Precedence
  • Related
Edit this page
Kubeadapt

Kubernetes FinOps platform. Cost visibility, rightsizing, and capacity planning that pays for itself in 30 days.

Product

  • Cost Monitoring
  • Cost Attribution
  • Workload Rightsizing
  • Recommendations
  • Smart Alerting
  • Best Practices
  • Network Cross-AZ

Resources

  • Documentation
  • Status Page
  • Feature Requests

Company

  • About Us
  • Security
  • Careers
  • Contact

© 2026 Kubeadapt. All rights reserved.

PrivacyTermsSecurity