A deployment scales to twenty replicas, and ten pods sit in Pending for four minutes. Is Karpenter slow, held back by a limit, or refused by the cloud provider? The Karpenter metrics separate these three hypotheses, as long as you read them in the right order. This article starts from that operating decision and builds a diagnosis path from it.
The metric names come from the official Karpenter reference (v1.15 docs at the time of writing). The configuration and query examples were written for this article and were not run on a cluster: test them outside production. Karpenter exposes Prometheus metrics; the Dynatrace SaaS part only covers delivering the data.
If Prometheus collection into Dynatrace is new to you, read the article on Prometheus and Dynatrace in Kubernetes first. Here, we assume the pipeline already exists.
What Karpenter decides, and what it lets you see
Karpenter watches unschedulable pods, picks an instance type, creates a NodeClaim, then waits for the node to join the cluster. Later, it consolidates or replaces nodes. Each step has its own family of metrics, prefixed with karpenter_.
The documentation groups them into sections: scheduler, nodeclaims, nodes, pods, nodepools, voluntary disruption, cloudprovider, interruption and cluster. Keep this logic in mind: a provisioning failure is read along the chain, from the queue to the cloud provider.
The entry point: the metrics port
According to the settings page, METRICS_PORT defaults to 8080 (the --metrics-port option). The page does not describe the Service or target discovery: that depends on your chart or manifests. Check it on your side before writing the scrape target.
Step 1: get the Karpenter metrics into Dynatrace
The simplest route is an OpenTelemetry Collector with the prometheus receiver, which scrapes Karpenter and exports over OTLP. The configuration below targets a Service named karpenter in the kube-system namespace: adapt it.
Three lines matter. A scrape_interval of 30 seconds is enough for provisioning that takes tens of seconds. The cumulativetodelta processor converts cumulative counters and histograms into deltas; I did not verify here whether it is mandatory for every metric type on the Dynatrace side, so check the OTLP ingest documentation. The token comes from an environment variable, never in clear text in the file.
Once data arrives, one check is enough: the query timeseries max(karpenter_scheduler_queue_depth) should return a series. If not, look at the Collector logs first.
Step 2: the queue, the first signal of waiting pods
Start with the metric closest to your pain. karpenter_scheduler_queue_depth counts the pods waiting for a decision. karpenter_scheduler_unschedulable_pods_count gives the number of unschedulable pods.
- Empty queue, pods still
Pending: Karpenter is not the problem; a pod constraint is (affinity, taint without toleration, zonal PVC). - Non-empty queue that drains quickly: Karpenter is working normally.
- Non-empty queue that does not go down: move on to step 3.
To measure the wait users actually see, karpenter_pods_startup_duration_seconds covers the time from pod creation to pod start. It is a good base for a startup SLI. To set an SLO on it, see burn-rate alerts on SLOs.
Step 3: a NodePool limit or a cloud refusal
Two common causes block node creation. The first is a limit you set yourself: karpenter_nodepools_usage against karpenter_nodepools_limit shows the remaining headroom per resource. The second is a provider refusal: karpenter_cloudprovider_instance_launch_failures_total counts failed launches, with the reason as a label, and karpenter_cloudprovider_errors_total counts call errors.
Here is a NodePool with an explicit limit. A value set too low turns a load spike into waiting pods, with no error on the cloud side at all.
The disruption budgets in this manifest matter for the next step. For now, the useful part is the limits field: compare it with karpenter_nodepools_usage to see what percentage you are at.
Step 4: watch creations, terminations and consolidation
A cluster that creates and deletes nodes in a loop costs money and worries application teams. Four counters help you see it: karpenter_nodeclaims_created_total, karpenter_nodes_created_total, karpenter_nodes_terminated_total and karpenter_voluntary_disruption_decisions_total. The last one carries the decision, the reason and the consolidation type.
Two more families complete the picture. karpenter_nodepools_allowed_disruptions shows how many nodes may be disrupted at once, by reason. karpenter_pods_drained_total counts the pods evicted when nodes shut down. If you see many consolidation decisions at a fixed hour, compare them with your deployment windows.
To link those nodes to the affected services, the topology query from the article on Kubernetes topology in DQL takes over. For money, karpenter_nodepools_cost_total gives an estimate of the cost as Karpenter sees it, which the documentation describes as not authoritative for billing. For reliable cost tracking, see OpenCost.
Best practices for Karpenter metrics
- Alert on symptoms: pods waiting for more than N minutes, not every isolated cloud error.
- Keep the useful labels (
nodepool,zone,capacity_type) and drop the rest to control cardinality. - Compare failed launches with the volume of NodeClaims created: a rate matters more than a total.
- Cross-check Karpenter decisions with cluster events, as in the article on Kubernetes events.
- If you also run a pod autoscaler such as KEDA, keep track of who creates pods and who creates nodes (KEDA).
Frequently asked questions
Do Karpenter metrics work outside AWS?
The scheduler, nodeclaims, nodes, pods and nodepools sections are generic. The « interruption » (SQS queue) and « EC2NodeClasses » sections are specific to the AWS provider. For another provider, I did not verify which metrics are exposed: read your provider’s page.
Do I need a Collector, or can Dynatrace scrape Prometheus directly?
This article uses an OpenTelemetry Collector, described in the configuration. Other paths exist (the Prometheus extension of the Operator, for example), but I did not test them here.
Which metric should I watch first?
Queue depth, karpenter_scheduler_queue_depth, then the cloud’s failed launches. This pair separates pods blocked by Karpenter from those blocked by their own constraints.
Conclusion
Observing Karpenter means following a chain: queue, NodePool limits, cloud response, then consolidation. A single metric says almost nothing; the sequence says where it blocks. To complete the alerting side, reread the Kubernetes alerts on nodes, pods and quotas. The full list of metrics is in the official reference.
Independent blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of Dynatrace LLC. Karpenter is a separate project, unrelated to Dynatrace.
Originally published on span.observer. French version: https://span.observer/fr/metriques-karpenter-provisionnement-noeuds/.



Top comments (0)