AI Cloud Architect

Experimenting with ClusterNetworkPolicy in GKE

GoogleHow-to by Ammett WilliamsGoogle Cloud Blog (developers and practitioners)

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

A walkthrough of ClusterNetworkPolicy in GKE that restricts access to a Gemma 4 inference service on TPU v5e, denies cross-namespace traffic by default, and blocks pod access to the metadata server.

Who it is for

Platform teams running LLM inference on GKE that need cluster-wide network guardrails for sensitive model workloads.

Key points

  • Policies are evaluated in three tiers: Admin, NetworkPolicy and Baseline.
  • The example blocks 169.254.169.254 at the Admin tier, so namespace policies cannot override it.
  • Setup uses GKE Standard with Dataplane V2, a TPU v5e node pool and vLLM.

Timeline

Posts about Google Kubernetes Engine, oldest first.

  1. How-toBoosting LLM Performance with Tiered KV Cache on Google Kubernetes Engine · Google · How-to
  2. Blog postAgent Factory Recap: Supercharging Agents on GKE with Agent Sandbox and Pod Snapshots · Google · Blog post
  3. How-toCost-Effective AI with Ollama, GKE GPU Sharing, and vCluster · Google · How-to
  4. How-toExperimenting with GPUs: GKE managed DRANET and Inference Gateway AI Deployment · Google · How-to
  5. How-toBuild and Deploy a Remote MCP Server to GKE in 30 Minutes · Google · How-to
  6. How-toScaling LLM Inference: Multi-Node KV Cache Offloading with GKE & Managed Lustre · Google · How-to
  7. Blog postSecuring AI at Enterprise Scale: The Google Kubernetes Engine Blueprint · Google · Blog post
  8. This postExperimenting with ClusterNetworkPolicy in GKE
  9. PreviewScaling massive AI/ML workloads with IPv6 on Google Kubernetes Engine clusters · Google · Announcement
Show all 10 posts
  1. Generally availableGKE Inference Gateway and Quickstart are GA · Google · Announcement
  2. How-toBoosting LLM Performance with Tiered KV Cache on Google Kubernetes Engine · Google · How-to
  3. Blog postAgent Factory Recap: Supercharging Agents on GKE with Agent Sandbox and Pod Snapshots · Google · Blog post
  4. How-toCost-Effective AI with Ollama, GKE GPU Sharing, and vCluster · Google · How-to
  5. How-toExperimenting with GPUs: GKE managed DRANET and Inference Gateway AI Deployment · Google · How-to
  6. How-toBuild and Deploy a Remote MCP Server to GKE in 30 Minutes · Google · How-to
  7. How-toScaling LLM Inference: Multi-Node KV Cache Offloading with GKE & Managed Lustre · Google · How-to
  8. Blog postSecuring AI at Enterprise Scale: The Google Kubernetes Engine Blueprint · Google · Blog post
  9. This postExperimenting with ClusterNetworkPolicy in GKE
  10. PreviewScaling massive AI/ML workloads with IPv6 on Google Kubernetes Engine clusters · Google · Announcement