Expose Observability Stack (Prometheus and Grafana) Using Traefik
Scenario
Helm has already installed Prometheus and Grafana in the namespace platform-observability.
DNS entries for iximiuz.prometheus.io and iximiuz.grafana.io are already configured in /etc/hosts.
Create an Ingress resource named observability-ingress in the namespace platform-observability.
- Configure the Ingress to route all HTTP traffic for
iximiuz.prometheus.ioto the Serviceprometheus-kube-prometheus-prometheuson port9090. - Configure the Ingress to route all HTTP traffic for
iximiuz.grafana.ioto the Serviceprometheus-grafanaon port80. - Both Ingress rules with path
/withpathType: Prefix. - Set the Ingress class to
traefik.
Do not modify any existing Services.
The Grafana credentials for UI access are located at /home/laborant/grafana-credentials.
# Test Prometheus access
curl -v http://iximiuz.prometheus.io/query
# Test Grafana access
curl -v http://iximiuz.grafana.io/login
Hint
You need to create a single Ingress with two rules, one for each hostname. Each rule should have a path / with pathType: Prefix pointing to its respective service and port.