gke-workload-identity
Skill by google
Diagnoses why a Pod using Workload Identity Federation for GKE cannot authenticate to Google Cloud APIs. It checks cluster and node pool settings, Kubernetes ServiceAccount to IAM bindings, target resource roles and metadata server health. It is aimed at anyone setting up these bindings or debugging Pod credential errors.
Install gke-workload-identity
Built from the published package, never by AI.
git clone --depth 1 https://github.com/google/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/cloud/gke-workload-identity ~/.claude/skills/gke-workload-identityRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/google/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/skills/cloud/gke-workload-identity ~/.gemini/antigravity-cli/skills/gke-workload-identityAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install gke-workload-identity in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill diagnoses why a Pod using Workload Identity Federation for GKE cannot authenticate to Google Cloud APIs. It covers 403 errors mentioning iam.serviceAccounts.getAccessToken, "could not find default credentials" errors, and an unreachable GKE metadata server. It follows a fixed sequence: classify the error, check cluster and node pool Workload Identity settings, verify the KSA to IAM binding, verify roles on the target resource, and check gke-metadata-server health.
The skill is read-only and non-interactive. It reads cluster, IAM and logging state, then proposes gcloud commands or GitOps manifest changes for a human to apply. It prefers direct principal binding and treats legacy Google ServiceAccount impersonation as the older path. It is meant for people setting up KSA to GSA bindings or debugging a Pod that cannot reach Google Cloud APIs.
Written from the project's SKILL.md and checked against it.
What it can do
- Error signature classificationMaps Pod error messages to the most likely failing path, such as impersonation, target role or metadata server.
- Workload Identity config checkChecks the cluster workload pool and whether the node pool uses the GKE_METADATA mode.
- KSA binding checkInspects direct principal bindings and the legacy iam.gke.io/gcp-service-account annotation with workloadIdentityUser.
- Target resource IAM checkSearches IAM policies with Cloud Asset Inventory to see if the identity has the required role.
- Metadata server checkCovers gke-metadata-server connectivity and health in the kube-system namespace.
- Cloud Logging queriesProvides Logs Explorer queries for a Pod's warning and error logs over a time window.
- Proposed remediation commandsSuggests exact gcloud or manifest changes with real identifiers for a human to apply.
What you need
- gcloud CLI
- kubectl access to the cluster
- Access to Cloud Logging in the Google Cloud project
- A GKE cluster using Workload Identity Federation
Try asking
- Why does my GKE Pod get a 403 iam.serviceAccounts.getAccessToken error?
- Check whether my GKE node pool has the GKE_METADATA metadata mode enabled
- Verify the KSA to GSA workloadIdentityUser binding for my namespace
Good to know
- Read-only: proposes fixes but never creates or changes IAM bindings, annotations, node pools or clusters.
- A human must apply any proposed change.
- The IAM Policy Troubleshooter has limited support for Workload Identity principals, so Cloud Asset Inventory is used instead.
- Out of scope: in-cluster RBAC errors, general workload crashes, and Pod Security or NetworkPolicies.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/cloud/gke-workload-identity/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md18 KB -
references/attribution.md2 KB
Alternatives to gke-workload-identity
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
gke-workload-identity: common questions
What errors does this skill diagnose?
It covers 403 iam.serviceAccounts.getAccessToken or permission denied errors, "could not find default credentials" errors, and an unreachable GKE metadata server.
Does it change IAM bindings or cluster settings?
No. It only reads state and proposes commands that a human must review and apply.
Which binding model does it recommend?
Direct principal binding is the current default. GSA impersonation is treated as the legacy path.
How do I install gke-workload-identity?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is gke-workload-identity free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is gke-workload-identity safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to gke-workload-identity?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
