Challenge, Easy,  on  Kubernetes

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.io to the Service prometheus-kube-prometheus-prometheus on port 9090.
  • Configure the Ingress to route all HTTP traffic for iximiuz.grafana.io to the Service prometheus-grafana on port 80.
  • Both Ingress rules with path / with pathType: 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.


💡Test Cases