Skip to main content
Configuring metrics and logging for the ngrok Kubernetes Operator is essential for gaining visibility into how the Operator is handling your ingress resources and other CRDs. This guide explains the available observability features, and how to enable and customize them to:
  • Diagnose issues more quickly.
  • Track system performance.
  • Ensure the Operator is running reliably in production.

Metrics

The ngrok Kubernetes Operator exposes a set of Prometheus-compatible metrics that provide insight into the Operator’s internal state and the resources it manages. By enabling metrics, you can monitor reconciliation activity, track resource health, and build alerts around key operational behaviors.

Supported metrics

This project is built using Kubebuilder. By default, it exposes the metrics described in the Kubebuilder metrics reference.

Accessing metrics

This Operator exposes prometheus metrics on the /metrics endpoint. The metrics are exposed on the :8080 port and can be scraped by Prometheus or other services. The controller applies these annotations by default.

Logging

The ngrok Kubernetes Operator generates structured logs that capture its reconciliation processes, configuration changes, and any errors encountered while managing resources. These logs are a primary source of truth when diagnosing issues or understanding the Operator’s actions.

Configure log levels

By tuning the Operator’s log level, you can control the level of detail emitted in logs. This lets you strike the right balance between observability and signal-to-noise, whether you’re troubleshooting an issue, monitoring production workloads, or reducing log volume.

Available log levels

Via helm

To configure the log level via helm, use --set to supply the desired log

Via helm value overrides

The log level can be configured through Helm value overrides, allowing you to define logging behavior in a reproducible, version-controlled way. This approach is ideal when you want consistent settings across environments or when deploying via automated pipelines. To override the log level, specify the configuration in your values.yaml file and pass the file to helm using the --values option (more info).