-
I'm trying to find a way to dynamically discover k8s ingresses and make HTTP checks against "Hosts" which are defined in ingress spec. Ingresses seem to be discovered fine, but how to use "Hosts" spec value on which to run actual check? The config I use:
With the above configuration, all targets are reported as unhealthy. If I explicitly specify targets with host_names, then targets are found healthy as they should:
This is how ingresses look on k8s:
I suspect that I'm missing some filters or labels in the config to use with k8s targets, appreciate advise here. PS Great tool by the way! Really happy that I found it and eagerly looking to make it work in our environment to run uptime checks inside the network. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
@0leksei Cloudprober by default should use However, Cloudprober uses ingress's load balancer IP/hostname from status ( Can you please share what you're getting in the logs for probe failures? |
Beta Was this translation helpful? Give feedback.
-
I am running Cloudprober on GKE and using nginx-ingress as ingress controller. Ingress status looks like this:
The targets names are populated in a form of Regarding the logs - which logs should I look into? By default I only get these logs in Google Logs from the Cloudprober deployment: |
Beta Was this translation helpful? Give feedback.
-
Yeah, the target names look correct. Cloudprober does that to differentiate between hosts within an ingress. But it still uses the correct host and IP address, or at least it should. On GKE logs go directly to Google Stackdriver. They call it Cloud Operations Suite now I think (logs in Stackdriver are index by probe names -- cloudprober.uptime_checks in your case). You can use the flag |
Beta Was this translation helpful? Give feedback.
-
We should be using rule's host name for TLS ServerName. I have an idea of what might be going on here. To confirm, can you please try adding: If it works, I'll change it so that this option is not required anymore. |
Beta Was this translation helpful? Give feedback.
-
Filed an issue to fix this: #417. |
Beta Was this translation helpful? Give feedback.
We should be using rule's host name for TLS ServerName. I have an idea of what might be going on here. To confirm, can you please try adding:
resolve_first: true
to your config?If it works, I'll change it so that this option is not required anymore.