Quick Start
Connect your first cluster and see cost optimization recommendations in under 5 minutes.
Prerequisites
- A Kubernetes cluster (any provider or on-premise)
kubectlconfigured with access to the cluster- A K8Cost account (free tier works)
Step 1: Create an API Token
After signing in, navigate to Settings > API Tokens and create a new token. Copy the token value -- you will need it in the next step.
The token authenticates the agent running inside your cluster with the K8Cost API. It is sent as an X-API-Key header and never stored on disk inside the cluster.
Step 2: Deploy the Agent
Apply the RBAC resources and CronJob to your cluster:
# Create a namespace for K8Cost
kubectl create namespace k8cost
# Apply RBAC (read-only ClusterRole)
kubectl apply -f https://k8cost.com/install/rbac.yaml
# Create the secret with your API token
kubectl create secret generic k8cost-secrets \
--namespace k8cost \
--from-literal=api-key=YOUR_API_TOKEN
# Deploy the CronJob agent
kubectl apply -f https://k8cost.com/install/cronjob.yaml
The CronJob runs hourly by default. To trigger an immediate analysis, create a one-off Job:
kubectl create job k8cost-initial --from=cronjob/k8cost-analyzer -n k8cost
Step 3: View Your Dashboard
Once the agent completes its first run (typically 1-3 minutes depending on cluster size), your data appears in the K8Cost dashboard at k8cost.com/dashboard.
You will see:
- Monthly cost estimate based on your cluster's resource allocation and cloud-provider pricing
- Savings potential -- the total monthly savings from all actionable recommendations
- Top recommendations ranked by estimated impact, with one-click patch generation
- Cluster health overview showing node utilization, namespace breakdown, and waste categories
What Happens Next
The agent runs on a configurable schedule (default: hourly). Each run collects current resource usage, evaluates it against 65+ optimization rules, and pushes the results to K8Cost. Your dashboard updates automatically.
As your cluster changes -- new deployments, scaling events, configuration updates -- K8Cost continuously re-evaluates and adjusts recommendations. Stale recommendations are automatically resolved when the underlying issue is fixed.
Next Steps
- Learn more about the agent -- configuration options, resource requirements, and security model
- Connect additional clusters -- the two sync methods and when to use each
- Explore the dashboard -- navigate cost breakdowns, waste analysis, and recommendations