-
Notifications
You must be signed in to change notification settings - Fork 151
Error initializing cloudprober #432
Comments
As I'm using Istio there are these issues:
The solution for while is: apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: metadata-google-internal
spec:
hosts:
- metadata.google.internal
http:
- route:
- destination:
host: metadata.google.internal
headers:
request:
remove:
- x-forwarded-for
---
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: metadata-google-internal
spec:
hosts:
- metadata.google.internal
addresses:
- 169.254.169.254
ports:
- name: http
number: 80
protocol: HTTP
- name: https
number: 443
protocol: HTTPS
location: MESH_INTERNAL
resolution: DNS But this solution for some reason add a delay of 20s in the pod startup. |
Thanks a lot @JohnWillker for reporting this bug. I haven't seen the istio issues in details yet, but it seems that metadata server is not visible (at least using the IPs which is what Golang libraries use) without adding a virtual service. I'll look into it more to see if we can do something about it. If you're using the latest cloudprober image, you can try using --cloud_metadata=none flag to disable the cloud metadata initialization (see #417 for more details on this issue). |
The |
I looked around a little bit. Problem is metadata's OnGCE method uses both IP and the metadata hostname both to decide whether it's running on GCE or not: But, while doing the rest of the queries, it uses only IP address: I am not sure what we can do about it in cloudprober. Ideally istio/metadata library should resolve it. There is a workaround to it though: you can set the environment variable GCE_METADATA_HOST to "metadata.google.internal", or you can simply use the flag --cloud_metadata=none to disable this behavior completely. |
I'll close this. Please let us know if you have any suggestions. |
I followed exactly as it is in this tutorial and had this problem to initialize the pod:
In a locally Kubernetes cluster all the things work perfectly but in the GKE clusters not.
I'm using the last version of Cloudprober and Kubernetes(GKE) in
v1.14.10-gke.36
versionWhat I'm doing wrong?
Maybe something related to this:
cloudprober/cmd/cloudprober.go
Lines 129 to 133 in 5c1b573
The text was updated successfully, but these errors were encountered: