Just installed stable/prometheus chart with below values and I'm able to access the server frontend from pods but not from host's web browser.
My values.yaml:
alertmanager:
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
hosts:
- localhost/alerts
server:
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
hosts:
- localhost/prom
pushgateway:
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
hosts:
- localhost/push
I use nginx ingress and ingresses get created but for some unknown reason, it doesn't seem to map to the service.
Some data:
I'm able to access the server from ingress pods (also all others) via default and dns service names:
kubectl exec -it nginx-ingress-controller-5cb489cd48-t4dgv -- sh
/etc/nginx $ curl prometheus-server.default.svc.cluster.local
<a href="/graph">Found</a>
/etc/nginx $ curl prometheus-server
<a href="/graph">Found</a>
List of active ingresses created by the chart:
kubectl get ingress
NAME HOSTS ADDRESS PORTS AGE
nginx-ingress localhost localhost 80 37h
prometheus-alertmanager localhost localhost 80 43m
prometheus-pushgateway localhost localhost 80 43m
prometheus-server localhost localhost 80 43m
List of active service resources:
kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 37h
nginx-deployment ClusterIP 10.100.1.167 <none> 80/TCP 37h
nginx-ingress-controller LoadBalancer 10.109.57.131 localhost 80:32382/TCP,443:30669/TCP 36h
nginx-ingress-default-backend ClusterIP 10.107.91.35 <none> 80/TCP 36h
php-deployment ClusterIP 10.105.73.26 <none> 9000/TCP 37h
prometheus-alertmanager ClusterIP 10.97.89.149 <none> 80/TCP 44m
prometheus-kube-state-metrics ClusterIP None <none> 80/TCP,81/TCP 44m
prometheus-node-exporter ClusterIP None <none> 9100/TCP 44m
prometheus-pushgateway ClusterIP 10.105.81.111 <none> 9091/TCP 44m
prometheus-server ClusterIP 10.108.225.187 <none> 80/TCP 44m
On the other hand, if I declare subdomain as an ingress host, Prometheus is accessible:
alertmanager:
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
hosts:
- alerts.localhost
server:
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
hosts:
- prom.localhost
pushgateway:
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
hosts:
- push.localhost
Am I doing something wrong or there's some sort of issue with this? Any suggestions?
Thanks in advance!
Version of Helm and Kubernetes: Helm 3.0.3 / Kubernetes 1.15.5 (Docker for Mac, MacOS Catalina)