Quick Start¶
This guide takes you from zero to seeing Crossplane metrics in under five minutes.
1. Deploy xp-tracker¶
Create a Kustomize overlay for your environment:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patches:
- target:
kind: ConfigMap
name: crossplane-metrics-exporter
patch: |
apiVersion: v1
kind: ConfigMap
metadata:
name: crossplane-metrics-exporter
data:
CLAIM_GVRS: "myorg.io/v1alpha1/databases,myorg.io/v1alpha1/caches"
XR_GVRS: "myorg.io/v1alpha1/xdatabases,myorg.io/v1alpha1/xcaches"
CREATOR_ANNOTATION_KEY: "myorg.io/created-by"
TEAM_ANNOTATION_KEY: "myorg.io/team"
images:
- name: ghcr.io/kanzifucius/xp-tracker
newTag: latest
Apply it:
2. Verify the exporter is running¶
3. Check metrics¶
Port-forward to the exporter:
Verify the exporter is ready:
Then query the metrics endpoint:
You should see output like:
# HELP crossplane_claims_total Number of Crossplane claims by group, kind, namespace, composition and creator.
# TYPE crossplane_claims_total gauge
crossplane_claims_total{composition="db-small",creator="alice@example.com",group="myorg.io",kind="Database",namespace="team-a",team="platform"} 3
4. Check bookkeeping¶
The JSON bookkeeping endpoint provides a full snapshot of all tracked resources:
Next steps¶
- Configure environment variables to tune polling, namespaces, and annotation keys
- Set up Prometheus scraping for production monitoring
- Build Grafana dashboards with example PromQL queries
- Understand health endpoints for Kubernetes probes