Get Project ID using Metadata Endpoint
Why
If you're running a workload in GKE, sometimes it's useful to know what project that pod runs under
How
curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/project/project-id
Read next
Want to make this site better? Open a PR or help fund hosting costs