Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upKubernetes ingress discovery does not set address label for ingresses without host #4008
Comments
This comment has been minimized.
This comment has been minimized.
|
What address label did you expect to be set here? |
This comment has been minimized.
This comment has been minimized.
|
The IP that the ingress controller has allocated to this ingress object to fulfill it. In the case below I can see general problems with ingress discovery as there's no guarantee that either the hostname used in the $ kubectl --namespace=monitoring-prometheus describe ingress alertmanager-ingress
Name: alertmanager-ingress
Namespace: monitoring-prometheus
Address: 192.168.122.106
Default backend: default-http-backend:80 (172.17.0.5:8080)
Rules:
Host Path Backends
---- ---- --------
*
/alertmanager alertmanager:http (<none>)
alertmanager.local
alertmanager:http (<none>)
Annotations:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal UPDATE 3m (x9 over 2d) nginx-ingress-controller Ingress monitoring-prometheus/alertmanager-ingress$ kubectl --namespace=monitoring-prometheus get ingress alertmanager-ingress --output yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"extensions/v1beta1","kind":"Ingress","metadata":{"annotations":{"kubernetes.io/ingress.class":"nginx","nginx.ingress.kubernetes.io/rewrite-target":"/","prometheus.io/probe":"true"},"name":"alertmanager-ingress","namespace":"monitoring-prometheus"},"spec":{"rules":[{"http":{"paths":[{"backend":{"serviceName":"alertmanager","servicePort":"http"},"path":"/alertmanager"}]}},{"host":"alertmanager.local","http":{"paths":[{"backend":{"serviceName":"alertmanager","servicePort":"http"}}]}}]}}
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
prometheus.io/probe: "true"
creationTimestamp: 2018-03-22T21:47:28Z
generation: 7
name: alertmanager-ingress
namespace: monitoring-prometheus
resourceVersion: "76373"
selfLink: /apis/extensions/v1beta1/namespaces/monitoring-prometheus/ingresses/alertmanager-ingress
uid: 9e03f903-2e1a-11e8-930e-f8dac8f5e6eb
spec:
rules:
- http:
paths:
- backend:
serviceName: alertmanager
servicePort: http
path: /alertmanager
- host: alertmanager.local
http:
paths:
- backend:
serviceName: alertmanager
servicePort: http
status:
loadBalancer:
ingress:
- ip: 192.168.122.106 |
This comment has been minimized.
This comment has been minimized.
yunlzheng
commented
Jun 8, 2018
|
same issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mattias- commentedMar 24, 2018
•
edited
What did you do?
Configured discovery of kubernetes ingresses.
What did you expect to see?
All annotated ingresses to show up as targets that can be successfully scraped.
What did you see instead? Under which circumstances?

No target label is set for ingresses that hasn't specified a host and the scraping fail.
Environment
Linux 4.9.64 x86_642.2.1docker image