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 service auto-discovery expect services available at *.svc #2101
Comments
This comment has been minimized.
This comment has been minimized.
|
@jimmidyson ideas how to handle that? Should we just let users specify it or are you aware of any API endpoint we could dynamically get that info from? |
fabxc
added
component/service discovery
kind/friction
priority/P1
labels
Nov 14, 2016
This comment has been minimized.
This comment has been minimized.
|
There is no way I know of to get the domain, but the cluster domain should be added as a search suffix to resolv.conf (e.g. I guess you could add an optional domain to Prometheus config. |
This comment has been minimized.
This comment has been minimized.
|
Mh, I'd like to avoid adding more options and what you say sounds totally correct. |
This comment has been minimized.
This comment has been minimized.
|
Yeah, fixing this in resolv.conf sounds reasonable. We can close this issue, Thanks! |
bkupidura
closed this
Nov 17, 2016
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
bkupidura commentedOct 20, 2016
Kubernetes service auto-discovery expect to have service available at SVC_NAME.SVC_NAMESPACE.svc this is not always true.
$ host nova-api.namespace.svc
Host nova-api.namespace.svc not found: 3(NXDOMAIN)
$ host nova-api.namespace.svc.cluster.local
nova-api.namespace.svc.cluster.local has address 10.233.56.241
User should have possibility to somehow provide domain suffix.
I tried to use relabel_configs, but without success:
- source_labels: [__param_target]
target_label: instance
regex: (.+):(\d+)
replacement: $1.cluster.local:$2
action: replace
Please check: https://github.com/prometheus/prometheus/blob/master/retrieval/discovery/kubernetes/service.go#L115