Skip to content

Example: Kubernetes Deployment

apiVersion: v1
kind: Namespace
metadata:
name: demo-payments
labels:
cost.clustercost.io/tenant: "acme-co"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: checkout-api
namespace: demo-payments
labels:
cost.clustercost.io/service: "checkout"
spec:
replicas: 2
selector:
matchLabels:
app: checkout-api
template:
metadata:
labels:
app: checkout-api
spec:
containers:
- name: api
image: ghcr.io/example/checkout:v1
resources:
requests:
cpu: "200m"
memory: "256Mi"

Apply this file, install the agent, and the dashboard will show spend under Tenant = acme-co → Service = checkout.