Change hardcoded "metadata" to "metadata.google.internal" (original) (raw)
Resolution of the metadata endpoint from within a Istio enabled GKE pod works only with "metadata.google.internal" as the url and not "metadata". No output is produced without the FQDN.
$ curl "http://metadata/computeMetadata/v1/instance/disks/" -H "Metadata-Flavor: Google"
$ curl "http://metadata.google.internal/computeMetadata/v1/instance/disks/" -H "Metadata-Flavor: Google"
0/
Can this be changed to include the FQDN?
| private static final String METADATA_URL = "http://metadata/computeMetadata/v1/"; |
|---|