Primarily my use-case is to fetch the Service Id, Service name, namespace etc from the running container.
Does Cloud Run support access to this data from the running containers ?
Thanks @knet .
My use case needs some additional information like IP address, labels. Something equivalent to attached image. Can you please let me know if its possible to fetch this info from the running containers(using API or something equivalent).
There’s also a metadata server, documented on the same page.
I don’t think there’s a way to get labels information, sorry.
For IP address: Cloud Run services don’t get their own IP address; instead, they each get a URL which is served from a shared IP pool. The URLs aren’t easy to predict or discover at the moment, we’re working on a solution in this space.
Thanks @knet . I tried to use Cloud Client Library to access these APIs as suggested in the docs.
However, it appears that authentication is failing for my API.
Attached error message for your reference.
Please find my code snippet below. Can you please share some pointers on how to proceed with authentication