prometheus operator v0.93.1

PodMonitor.spec.podMetricsEndpoints[].portNumber

portNumber defines the `Pod` port number which exposes the endpoint. The `Pod` must declare the specified `Port` in its spec or the target will be dropped by Prometheus. This cannot be used to enable scraping of an undeclared port. To scrape targets on a port which isn't exposed, you need to use relabeling to override the `__address__` label (but beware of duplicate targets if the `Pod` has other declared ports). In practice Prometheus will select targets for which the matches the target's __meta_kubernetes_pod_container_port_number.

1 fields
PodMonitor.spec.podMetricsEndpoints[].portNumber fields and descriptions
Field / TypeDescription
PodMonitor.spec.podMetricsEndpoints[].portNumber
integer

portNumber defines the `Pod` port number which exposes the endpoint. The `Pod` must declare the specified `Port` in its spec or the target will be dropped by Prometheus. This cannot be used to enable scraping of an undeclared port. To scrape targets on a port which isn't exposed, you need to use relabeling to override the `__address__` label (but beware of duplicate targets if the `Pod` has other declared ports). In practice Prometheus will select targets for which the matches the target's __meta_kubernetes_pod_container_port_number.

  • format: int32
  • minimum: 1
  • maximum: 65535