Prometheus Operator custom resources

The Prometheus Operator manages Prometheus and Alertmanager instances in a cluster through custom resources.

The Prometheus Operator manages Prometheus and Alertmanager instances in a cluster through custom resources. The monitoring stack of Cloudera Cloud Factory uses these resources. Instead of editing configuration files, you create or change a custom resource, and the Operator updates the running components.

Table 1. Prometheus Operator custom resources
Custom resourcePurpose
PrometheusDefines a Prometheus server deployment.
AlertmanagerDefines an Alertmanager deployment.
ThanosRulerDefines a Thanos Ruler deployment.
ServiceMonitorSelects Services whose endpoints Prometheus scrapes.
PodMonitorSelects Pods that Prometheus scrapes.
ProbeDefines probes of Ingresses or static targets.
PrometheusRuleDefines alerting and recording rules.
AlertmanagerConfigDefines routing and receivers for Alertmanager.
PrometheusAgentDefines a Prometheus instance in agent mode, which forwards metrics without local querying.

Key defaults and limits

  • Each Prometheus runs as a StatefulSet for each shard. The default is one shard. A config-reloader sidecar applies configuration changes.
  • Run Alertmanager with two or more replicas for high availability. The Operator mounts the configuration from the Secret alertmanager-<name>, with the key alertmanager.yaml.

For the Alertmanager concepts, see Monitoring stack in Tools and reference.

For more information, see Prometheus Operator design.