Gke Platform Security
GoogleOfficialPublished by Google
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to securing the GKE control plane and infrastructure. It covers essential platform-level configurations including Secret Manager integration, RBAC hardening, Binary Authorization, and node-level security features like Shielded Nodes and GKE Sandbox. It emphasizes a golden path for cluster security, including the removal of insecure legacy RBAC bindings and the implementation of least-privilege IAM roles for cluster management.
What it does
- Enables and configures the GKE Secret Manager add-on with automatic rotation.
- Hardens cluster RBAC by disabling insecure legacy bindings.
- Configures node-level security features such as Shielded Nodes and GKE Sandbox.
- Provides guidance on managing GKE-specific IAM roles for platform and cluster administrators.
- Outlines patterns for cross-service authentication between Google Service Accounts and cloud resources.
- Enforces Binary Authorization to ensure image provenance.
When to use it
- During the initial setup of a new GKE cluster to ensure secure defaults.
- When auditing or hardening an existing GKE cluster's control plane security.
- When configuring cluster-wide add-ons like Secret Manager.
- When defining IAM roles for platform teams and cluster operators.
- When enabling runtime isolation features like GKE Sandbox.
Advantages
- Promotes a secure-by-default configuration for GKE infrastructure.
- Reduces the attack surface by removing insecure legacy RBAC bindings.
- Simplifies the implementation of complex security features like Binary Authorization.
- Provides clear, actionable commands for platform hardening.
- Maintains consistency across cluster environments through defined golden path settings.
Usage examples
- “Enable Secret Manager on my GKE cluster named production-cluster in the us-central1 region.”
- The agent will execute the gcloud container clusters update command with the --enable-secret-manager flag and a 120s rotation interval.
- “How can I harden my GKE cluster by enabling Shielded Nodes?”
- The agent will provide the gcloud command to update the cluster with the --enable-shielded-nodes flag.
- “What are the recommended IAM roles for a cluster operator?”
- The agent will recommend the roles/container.clusterAdmin role and explain its scope compared to other container-related roles.
- “Enable GKE Sandbox on my existing cluster.”
- The agent will provide the gcloud container clusters update command with the --enable-gke-sandbox flag.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/google/gke-platform-security/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip gke-platform-security.zip -d .agents/skills
Documentation by Google
GKE Platform Security
This reference covers platform-level security hardening and cluster
configuration for Google Kubernetes Engine (GKE). For workload-level security
controls (such as Workload Identity Service Account bindings,
SecretProviderClass volume mounts, Network Policies, and Pod Security
Standards), refer to the gke-workload-security skill.
MCP Tools:
gke:get_cluster,k8s:check_k8s_auth,k8s:get_k8s_resource,k8s:apply_k8s_manifest,gke:update_cluster
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-platform-security)"
and append agent-skills/1.0 (skill:gke-platform-security) to User-Agent headers.
Golden Path Security Defaults
| Setting | Golden Path Value | Day-0/1 | Notes |
|---|---|---|---|
workloadIdentityConfig.workloadPool | <PROJECT>.svc.id.goog | Day-0 | Workload Identity Federation for cluster pods |
secretManagerConfig.enabled | true | Day-1 | Google Secret Manager cluster add-on integration |
secretManagerConfig.rotationConfig | enabled: true, rotationInterval: 120s | Day-1 | Automatic secret rotation at the cluster level |
rbacBindingConfig.enableInsecureBindingSystemAuthenticated | false | Day-0 | Blocks legacy system:authenticated bindings |
rbacBindingConfig.enableInsecureBindingSystemUnauthenticated | false | Day-0 | Blocks legacy system:unauthenticated bindings |
nodeConfig.shieldedInstanceConfig.enableSecureBoot | true | Day-0 | Verifiable boot integrity |
nodeConfig.shieldedInstanceConfig.enableIntegrityMonitoring | true | Day-0 | Runtime integrity checks |
nodeConfig.workloadMetadataConfig.mode | GKE_METADATA | Day-0 | Blocks legacy metadata API, enforces Workload Identity |
| Private cluster + Dataplane V2 settings | See the gke-networking skill | Day-0 | Private nodes, private endpoint enforcement, ADVANCED_DATAPATH |
Secret Manager Add-on Enablement
The golden path enables Secret Manager at the cluster level with automatic secret rotation.
# Verify Secret Manager is enabled on cluster
gcloud container clusters describe <CLUSTER_NAME> --region <REGION> \
--format="value(secretManagerConfig.enabled)" \
--quiet
# Enable if not already (Day-1 change)
gcloud container clusters update <CLUSTER_NAME> --region <REGION> \
--enable-secret-manager \
--secret-manager-rotation-interval=120s \
--quietNote: For configuring
SecretProviderClassmanifests and mounting secrets as volumes inside application deployments, see thegke-workload-securityskill.
RBAC Hardening
The golden path disables insecure legacy RBAC bindings that grant broad access
to system:authenticated and system:unauthenticated groups.
# Verify insecure bindings are disabled
gcloud container clusters describe <CLUSTER_NAME> --region <REGION> \
--format="yaml(rbacBindingConfig)" \
--quietBest practices for RBAC:
Use namespace-scoped Roles over cluster-wide ClusterRoles.
Bind to specific Groups or ServiceAccounts, never to
system:authenticatedorsystem:unauthenticated.Audit permissions via MCP:
k8s:check_k8s_auth(parent="...", verb="list", resourceType="pods", namespace="...")(orkubectl auth can-i --list --as=<user>).Review bindings via MCP:
k8s:get_k8s_resource(parent="...", resourceType="clusterrolebinding")(orkubectl get clusterrolebindings,rolebindings --all-namespaces).
See the
gke-multitenancyskill for enterprise RBAC planning and https://docs.cloud.google.com/kubernetes-engine/docs/best-practices/rbac.md.txt
Binary Authorization
Not enabled in golden path by default but recommended for enforcing production image provenance across the cluster:
# Enable Binary Authorization
gcloud container clusters update <CLUSTER_NAME> --region <REGION> \
--binauthz-evaluation-mode=PROJECT_SINGLETON_POLICY_ENFORCE \
--quietShielded Nodes & GKE Sandbox Enablement
Enabling verifiable node boot integrity and kernel isolation features at the cluster level:
# Enable Shielded Nodes on an existing cluster
gcloud container clusters update <CLUSTER_NAME> --region <REGION> \
--enable-shielded-nodes \
--quiet
# Enable GKE Sandbox (gVisor) runtime on an existing cluster
gcloud container clusters update <CLUSTER_NAME> --region <REGION> \
--enable-gke-sandbox \
--quietNote: To run workloads inside the gVisor sandbox, specify
runtimeClassName: gvisorin your Pod specs as detailed in thegke-workload-securityskill.
Common IAM Roles
The five most common predefined IAM roles for GKE platform and cluster access:
| Role | Purpose | When to Use |
|---|---|---|
roles/container.admin | Full control over | Platform team admins |
| : : clusters and : managing cluster : | ||
| : : Kubernetes : lifecycle : | ||
| : : resources : : | ||
roles/container.clusterAdmin | Manage clusters but | Cluster operators |
| : : not project-level : who create/delete : | ||
| : : IAM : clusters : | ||
roles/container.developer | Deploy workloads | Application |
| : : (pods, services, : developers deploying : | ||
| : : deployments) : to existing clusters : | ||
roles/container.viewer | Read-only access to | Monitoring, |
| : : clusters and : auditing, or : | ||
| : : Kubernetes : read-only dashboards : | ||
| : : resources : : | ||
roles/container.clusterViewer | List and get | CI/CD pipelines that |
| : : cluster details : need cluster : | ||
| : : only : metadata : |
Principle of least privilege: Start with
roles/container.viewerorroles/container.developerand escalate only as needed. Avoid grantingroles/container.adminbroadly across teams.
Service Accounts & Agents
GKE Service Agent (
service-<PROJECT_NUMBER>@container-engine-robot.iam.gserviceaccount.com): Automatically created. Manages nodes, networking, and cluster operations on your behalf. Do not remove or modify its permissions.Node Service Account: By default, nodes use the Compute Engine default service account. For production platforms, create a dedicated Google Service Account with minimal required permissions (
roles/monitoring.metricWriter,roles/logging.logWriter) and assign it at node pool creation time.Workload Identity: For binding Google Service Accounts to Kubernetes Service Accounts (
roles/iam.workloadIdentityUser), refer to thegke-workload-securityskill.
Cross-Service Authentication Patterns
Common project-level IAM policy binding patterns for granting backend Google Service Accounts (GSAs) access to external Google Cloud services before linking via Workload Identity:
# Grant a GSA access to Cloud Storage objects
gcloud projects add-iam-policy-binding <PROJECT_ID> \
--member "serviceAccount:<GSA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
--role "roles/storage.objectViewer" \
--quiet
# Grant a GSA access to Cloud SQL databases
gcloud projects add-iam-policy-binding <PROJECT_ID> \
--member "serviceAccount:<GSA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
--role "roles/cloudsql.client" \
--quiet
# Grant a GSA access to Pub/Sub subscriptions
gcloud projects add-iam-policy-binding <PROJECT_ID> \
--member "serviceAccount:<GSA_NAME>@<PROJECT_ID>.iam.gserviceaccount.com" \
--role "roles/pubsub.subscriber" \
--quiet
## Resources
- [GKE Cluster Hardening Guide](https://cloud.google.com/kubernetes-engine/docs/how-to/hardening-your-cluster)
- [GKE RBAC Best Practices](https://cloud.google.com/kubernetes-engine/docs/best-practices/rbac)
- [Secret Manager Add-on for GKE](https://cloud.google.com/secret-manager/docs/secret-manager-managed-csi-component)
- [Binary Authorization on GKE](https://cloud.google.com/binary-authorization/docs/setting-up)
- [Shielded GKE Nodes](https://cloud.google.com/kubernetes-engine/docs/how-to/shielded-gke-nodes)
- [GKE Sandbox (gVisor)](https://cloud.google.com/kubernetes-engine/docs/how-to/sandbox-pods)Files
- ATTRIBUTION.mdAdded by AutoGineer860 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md10.2 KiB
- references/attribution.md1.9 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs a command-line tool, Needs Node.js
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/gke-platform-security · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download gke-platform-security.zip