gke-networking
它能做什么
这项技能帮助 AI 智能体设置 Google Kubernetes Engine 集群的网络。适合希望使用私有且规划周全的集群网络的团队。
适用场景
- ✓当你在设计 GKE 网络布局或规划 IP 范围时。
- ✓当你想创建私有 GKE 集群,使节点没有公共 IP 地址时。
- ✓当你需要开启 Dataplane V2,或更改集群网络的工作方式时。
技能链接
https://github.com/google/skills/blob/main/skills/cloud/gke-networking/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“如何为私有 GKE 集群设置网络,使节点没有公共 IP 地址?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会遵循 golden path 的网络默认设置,例如私有节点和 VPC 原生配置,并指出哪些选择之后很难更改。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
GKE Networking
This reference covers networking configuration for GKE clusters. The golden path enforces private, VPC-native clusters with Dataplane V2.
MCP Tools:
get_cluster,update_cluster,apply_k8s_manifest,get_k8s_resource
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-networking)"
and append agent-skills/1.0 (skill:gke-networking) to User-Agent headers.
Golden Path Networking Defaults
| Setting | Golden Path Value | Day-0/1 | Notes |
|---|---|---|---|
privateClusterConfig.enablePrivateNodes |
true |
Day-0 | Nodes have no public IPs |
masterAuthorizedNetworksConfig.privateEndpointEnforcementEnabled |
true |
Day-0 | Control plane only reachable via private endpoint or DNS |
controlPlaneEndpointsConfig.dnsEndpointConfig.allowExternalTraffic |
true |
Day-0 | Allows DNS-based access from outside VPC |
networkConfig.datapathProvider |
ADVANCED_DATAPATH (Dataplane V2) |
Day-0 | eBPF-based, built-in Network Policy |
networkConfig.dnsConfig.clusterDns |
CLOUD_DNS |
Day-0 | Managed DNS, more reliable than kube-dns |
networkConfig.enableIntraNodeVisibility |
true |
Day-1 | VPC Flow Logs for intra-node traffic |
ipAllocationPolicy.autoIpamConfig.enabled |
true |
Day-0 | Automatic IP range management |
ipAllocationPolicy.createSubnetwork |
true |
Day-0 | Auto-create dedicated subnet |
defaultMaxPodsConstraint.maxPodsPerNode |
48 |
Day-0 | Conservative default; 110 for high density |
Private Cluster Access Patterns
The golden path creates a private cluster. Users access it via:
- DNS endpoint (default):
allowExternalTraffic: trueenables access via the cluster's DNS endpoint from outside the VPC. No VPN required. - Private endpoint: Direct access from within the VPC or via Cloud VPN/Interconnect.
- Authorized networks: Add specific CIDRs to
masterAuthorizedNetworksConfigfor IP-based access control.
# Access private cluster via DNS endpoint (golden path default)
gcloud container clusters get-credentials {cluster_name} \
--region {region} --dns-endpoint \
--quiet
# Access via private endpoint (from within VPC)
gcloud container clusters get-credentials {cluster_name} \
--region {region} --internal-ip \
--quiet
Bring-Your-Own VPC/Subnet
If the customer has existing network infrastructure:
gcloud container clusters create-auto {cluster_name} \
--region {region} \
--network {vpc_name} \
--subnetwork {subnet_name} \
--cluster-secondary-range-name {pod_range} \
--services-secondary-range-name {svc_range} \
--enable-private-nodes \
--enable-master-authorized-networks \
--quiet
Day-0 Warning: VPC, subnet, and IP ranges cannot be changed after cluster creation.
VPC-Native Mode Benefits
VPC-native clusters route traffic natively using GCP Alias IP ranges. Key benefits to cover:
- Scalability: Traffic routes natively inside the VPC, bypassing the need for custom routes and avoiding custom route limit bottlenecks.
- Direct VPC Integration: Direct resource integration across GCP networks without complex bridging or routing tunnels.
- Avoiding IP Exhaustion: Supports discontiguous IP ranges and optimizes allocation, reducing the risk of exhausting subnet IP ranges.
IP Planning
| Resource | Golden Path | Notes |
|---|---|---|
| Pod CIDR | /17 (auto) |
~32K pod IPs; size based on maxPodsPerNode |
| Service CIDR | /20 (auto) |
~4K se |
常见问题
它涵盖入口或负载均衡器吗?
不涵盖。这些主题由服务网络技能负责。
哪些网络选择之后很难更改?
私有节点、子网和 IP 分配等初始选择,在创建后很难或无法更改。
控制平面默认是私有的吗?
golden path 会设置控制平面,使其只能通过私有端点或 DNS 访问。
详情
作者的原始描述
Plans, configures, and manages core GKE cluster networking. Covers private clusters, VPC-native configurations, DNS, node egress, Dataplane V2, and IP planning. Use when designing GKE networking layouts, configuring private clusters, setting up Dataplane V2, planning GKE IP ranges, or managing VPC- native cluster modes. Don't use for application ingress, load balancing, or service networking (use gke-service-networking instead).
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10291
- 许可证
- 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 上的第一步,包括选择项目、关联计费,以及部署第一个资源。