New to Claude Skills? Learn how to install them →

google on GitHub

GKE Networking

Free

Streamline your GKE cluster networking setup.

by google17.6k stars on google/skills
1 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What GKE Networking does

GKE Networking is a specialized skill designed for planning, configuring, and managing the networking aspects of Google Kubernetes Engine (GKE) clusters. It emphasizes the implementation of private clusters and VPC-native configurations, ensuring that your networking setup adheres to best practices. The skill supports a variety of networking configurations, including DNS management, node egress, and IP planning, making it a comprehensive tool for developers and cloud architects working with GKE.

This skill is particularly useful when designing GKE networking layouts, as it guides users through the golden path defaults that enforce a secure and efficient networking environment. The golden path approach includes enabling private nodes, restricting control plane access to private endpoints, and utilizing Dataplane V2 for advanced networking capabilities. By following these guidelines, users can ensure that their clusters are well-architected from the outset, minimizing potential issues related to network security and performance.

GKE Networking also provides practical commands for accessing private clusters, managing IP ranges, and configuring egress traffic. It allows users to create clusters with existing VPCs and subnets, ensuring that they can integrate seamlessly into their existing infrastructure. The skill's focus on VPC-native mode offers significant benefits, including scalability and optimized IP allocation, which are crucial for organizations looking to expand their cloud resources efficiently.

This skill is intended for developers and cloud engineers who are responsible for GKE cluster setup and management. It is especially beneficial for those who prioritize security and performance in their cloud networking strategies, as well as those who need to comply with specific organizational policies regarding network access and traffic management.

When to use it

Use this skill when designing and configuring GKE networking layouts, particularly for private clusters and VPC-native configurations.

When not to use it

This skill is not suitable for managing application ingress, load balancing, or service networking; for those tasks, consider using gke-service-networking instead.

What you can build with it

Setting Up a Private GKE Cluster

Use this skill to configure a private GKE cluster with secure networking practices from the start.

Integrating with Existing VPCs

Leverage this skill to create GKE clusters that seamlessly fit into your existing VPC and subnet infrastructure.

Optimizing IP Allocation for GKE

Utilize the IP planning features of this skill to effectively manage IP ranges and avoid exhaustion.

How to install GKE Networking

View source

1. Install with the skills CLI

npx skills add google/skills/gke-networking --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by google

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

Golden Path Networking Defaults

SettingGolden Path ValueDay-0/1Notes
privateClusterConfig.enablePrivateNodestrueDay-0Nodes have no public IPs
masterAuthorizedNetworksConfig.privateEndpointEnforcementEnabledtrueDay-0Control plane only reachable via private endpoint or DNS
controlPlaneEndpointsConfig.dnsEndpointConfig.allowExternalTraffictrueDay-0Allows DNS-based access from outside VPC
networkConfig.datapathProviderADVANCED_DATAPATH (Dataplane V2)Day-0eBPF-based, built-in Network Policy
networkConfig.dnsConfig.clusterDnsCLOUD_DNSDay-0Managed DNS, more reliable than kube-dns
networkConfig.enableIntraNodeVisibilitytrueDay-1VPC Flow Logs for intra-node traffic
ipAllocationPolicy.autoIpamConfig.enabledtrueDay-0Automatic IP range management
ipAllocationPolicy.createSubnetworktrueDay-0Auto-create dedicated subnet
defaultMaxPodsConstraint.maxPodsPerNode48Day-0Conservative default; 110 for high density

Private Cluster Access Patterns

The golden path creates a private cluster. Users access it via:

  1. DNS endpoint (default): allowExternalTraffic: true enables access via the cluster's DNS endpoint from outside the VPC. No VPN required.
  2. Private endpoint: Direct access from within the VPC or via Cloud VPN/Interconnect.
  3. Authorized networks: Add specific CIDRs to masterAuthorizedNetworksConfig for 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:

  1. Scalability: Traffic routes natively inside the VPC, bypassing the need for custom routes and avoiding custom route limit bottlenecks.
  2. Direct VPC Integration: Direct resource integration across GCP networks without complex bridging or routing tunnels.
  3. Avoiding IP Exhaustion: Supports discontiguous IP ranges and optimizes allocation, reducing the risk of exhausting subnet IP ranges.

IP Planning

ResourceGolden PathNotes
Pod CIDR/17 (auto)~32K pod IPs; size based on maxPodsPerNode
Service CIDR/20 (auto)~4K service IPs
Node subnetauto-created/20 recommended for growth
Max pods/node48Each node gets a /25 pod range; set to 110
: : : for /24 per node :

Pod CIDR sizing rule of thumb:

  • maxPodsPerNode=48 -> each node uses a /25 (128 IPs) from pod CIDR
  • maxPodsPerNode=110 -> each node uses a /24 (256 IPs) from pod CIDR
  • Larger maxPodsPerNode = fewer nodes fit in a given CIDR

Egress

  • Default: nodes use Cloud NAT for outbound internet access (private nodes have no public IPs) to allow private nodes to reach the internet without public IP exposure.
  • For static egress IPs: configure Cloud NAT with manual IP allocation to maintain a consistent source IP for external allowlists or partner firewalls.
  • For restricted egress: route through a firewall appliance via custom routes to inspect and filter outbound traffic according to organization security policies.

Network Policy

Dataplane V2 (golden path) provides built-in Network Policy enforcement — no additional addon needed. Apply default-deny per namespace, then allow specific flows.

See the gke-workload-security skill for default-deny policy and the gke-multitenancy skill for per-team allow policies.

Frequently asked questions about GKE Networking

Similar skills