gke-platform-security
它能做什么
这项技能帮助 AI 智能体规划并加强 GKE 集群本身的安全设置。适合希望从一开始就拥有更安全集群的团队。
适用场景
- ✓当你想为 GKE 集群开启 Binary Authorization 或 Shielded Nodes 时。
- ✓当你需要为集群开启密钥加密或 Security Posture 时。
- ✓当你想删除不安全的角色绑定,并审计谁可以访问集群时。
技能链接
https://github.com/google/skills/blob/main/skills/cloud/gke-platform-security/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“如何让我的 GKE 集群更安全,包括加密密钥和 Shielded Nodes?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会对照 golden path 的安全默认值检查集群,然后就加密、访问规则、镜像检查和节点保护提出设置建议。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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 \
--quiet
Note: 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)" \
--quiet
Best 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
常见问题
它涵盖工作负载层面的安全吗?
不涵盖。工作负载身份绑定、网络策略和 Pod 安全由工作负载安全技能处理。
它有默认设置吗?
有。它使用 golden path 的值作为默认设置,例如 Workload Identity 和 Secret Manager 设置。
它能直接更改我的集群吗?
它可以读取集群设置,并使用所列的 GKE 和 Kubernetes 工具应用更改。
详情
作者的原始描述
Plans, configures, and hardens platform-level Google Kubernetes Engine (GKE) cluster security. Covers cluster add-ons (Secret Manager enablement), RBAC hardening (disabling insecure bindings, audit tools), Binary Authorization, Secrets Encryption (--database-encryption-key), Security Posture (--security-posture), enabling Shielded Nodes, GKE Sandbox cluster enablement, GKE IAM roles, and cross-service authentication IAM patterns. Use when securing cluster control planes, hardening GKE RBAC, enabling Shielded Nodes, enabling GKE Sandbox runtime, enabling cluster-wide security add-ons, or managi
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10294
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。