The ingress controller exposes the HAProxy Stats page and a Prometheus endpoint on port 1024. When deploying the ingress controller with a NodePort service, this port will be mapped to a random, high-numbered port, which you can see by listing the service’s details.

$ kubectl get svc -A

  NAMESPACE            NAME              TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)                                     AGE
  haproxy-controller   haproxy-ingress   NodePort    <none>        80:30279/TCP,443:30775/TCP,1024:31912/TCP   84s

In this example, port 1024 is mapped to NodePort 31912.

HAProxy Stats Page

View the HAProxy Stats page at the / URL. Learn more about the HAProxy Stats page in this blog post.

HAProxy Stats Page

Prometheus Endpoint

View Prometheus counters at the /metrics URL. Here is a sample of the metrics published on that page:

# HELP haproxy_frontend_bytes_in_total Current total of incoming bytes.
# TYPE haproxy_frontend_bytes_in_total counter
haproxy_frontend_bytes_in_total{proxy="healthz"} 27468
haproxy_frontend_bytes_in_total{proxy="http"} 565
haproxy_frontend_bytes_in_total{proxy="https"} 0
haproxy_frontend_bytes_in_total{proxy="stats"} 8927
# HELP haproxy_frontend_bytes_out_total Current total of outgoing bytes.
# TYPE haproxy_frontend_bytes_out_total counter
haproxy_frontend_bytes_out_total{proxy="healthz"} 42840
haproxy_frontend_bytes_out_total{proxy="http"} 26587
haproxy_frontend_bytes_out_total{proxy="https"} 0
haproxy_frontend_bytes_out_total{proxy="stats"} 2856685
# HELP haproxy_frontend_requests_denied_total Total number of denied requests.
# TYPE haproxy_frontend_requests_denied_total counter
haproxy_frontend_requests_denied_total{proxy="healthz"} 0
haproxy_frontend_requests_denied_total{proxy="http"} 0
haproxy_frontend_requests_denied_total{proxy="https"} 0
haproxy_frontend_requests_denied_total{proxy="stats"} 0

Next up