Skip to content

Instantly share code, notes, and snippets.

@lirlia
Created February 14, 2022 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lirlia/30855544e80a0d4e7cd0ea50d6e2a1ae to your computer and use it in GitHub Desktop.
Save lirlia/30855544e80a0d4e7cd0ea50d6e2a1ae to your computer and use it in GitHub Desktop.
root@pod-with-sa:/# curl -sSL -H "Metadata-Flavor: Google" "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts?recursive=true" | jq -r
{
"default": {
"aliases": [
"default"
],
"email": "gke-workload@PROJECT_ID.iam.gserviceaccount.com",
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}...
}
root@pod-with-sa:/# gcloud auth list
Credentialed Accounts
ACTIVE ACCOUNT
* gke-workload@PROJECT_ID.iam.gserviceaccount.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment