Prometheus dashboard exposed over alb-ingress-controller is not loading fully

4/21/2020

I am using Helm/Stable/Prometheus Server for my Metrics datasource and the Prometheus Server Dashboard is exposed using alb-ingress controller in AWS. Somehow the Prometheus webpage is not loading fully (few parts of the webpage are not getting loaded and throwing 404 errors). Here is the Ingress configuration:

  ingress:
## If true, Prometheus server Ingress will be created
##
enabled: true

## Prometheus server Ingress annotations
##
annotations:
   kubernetes.io/ingress.class: 'alb'
   #kubernetes.io/tls-acme: 'true'
   alb.ingress.kubernetes.io/scheme: internet-facing
   alb.ingress.kubernetes.io/load-balancer-attributes: 'routing.http2.enabled=true,idle_timeout.timeout_seconds=60'
   alb.ingress.kubernetes.io/certificate-arn: certname
   alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
   alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
service:
  annotations:
    alb.ingress.kubernetes.io/target-type: ip
labels: {}
path: /*
hosts:
   - prometheus.company.com

## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
extraPaths:
 - path: /*
   backend:
     serviceName: ssl-redirect
     servicePort: use-annotation

When I access prometheus.company.com, its getting properly redirected to prometheus.company.com/graph (assuming the redirect is working fine). However, some parts (*.js & *.css files) of the webpage is throwing 404 errors.

How can I resolve this?

-- vikram yerneni
eks
grafana
kubernetes
kubernetes-helm
prometheus

1 Answer

4/22/2020

I fixed the issue. Solution: hosts: - prometheus.company.com/*

-- vikram yerneni
Source: StackOverflow