[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6994P1RCBRCCQ42CX871A59":3,"skill-same:01M6994P1RCBRCCQ42CX871A59":117},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":60,"ownerDescription":61,"updatedAt":62,"install":63,"resources":76},"01M6994P1RCBRCCQ42CX871A59","gke-service-networking",null,"Configures GKE edge networking, traffic routing, load balancing, and private service endpoints. Use when configuring Gateway API manifests, standard Ingress, Cloud Armor WAF security policies, Container-Native Load Balancing (NEGs), Private Service Connect (PSC), or Google-managed SSL certificates on GKE, and to troubleshoot Ingress and load-balancer 502\u002F5xx errors, backend health-check failures, connection draining, and TLS\u002FSSL policy enforcement. Don't use for core cluster IP planning, Dataplane V2 network policies, or node NAT egress (use gke-networking instead).","google\u002Fskills","google","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1342004?v=4","01M698VYEFDM0VJBZDYYJ2T83S","Google","01M698WR0H76ENHE587T9EJT89",24235,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgke-service-networking\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,9,39,40,41,42,43,44,45],"gke service networking","networking","gke","service","api","when","managed","manifests","traffic","errors","native","ip","health-check","node","certificates","tls","nat","network","connect","troubleshoot","policy","security","2026-11-10 10:12:30",false,"---\nname: gke-service-networking\ndescription: >-\n  Configures GKE edge networking, traffic routing, load balancing, and private\n  service endpoints. Use when configuring Gateway API manifests, standard\n  Ingress, Cloud Armor WAF security policies, Container-Native Load Balancing\n  (NEGs), Private Service Connect (PSC), or Google-managed SSL certificates on\n  GKE, and to troubleshoot Ingress and load-balancer 502\u002F5xx errors, backend\n  health-check failures, connection draining, and TLS\u002FSSL policy enforcement.\n  Don't use for core cluster IP planning, Dataplane V2 network policies, or\n  node NAT egress (use gke-networking instead).\nmetadata:\n  version: \"1.1.1\"\n  category: Networking\n---\n\n# GKE Service Networking Skill\n\nThis skill provides workflows for exposing applications running on GKE securely\nto the internet or internal networks.\n\nDeployable manifest templates live in `assets\u002F` — edit the `# Replace ...`\nplaceholders before applying.\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gke-service-networking)\"`\nand append `agent-skills\u002F1.0 (skill:gke-service-networking)` to `User-Agent` headers.\n\n## Workflows\n\n### 1. Configure Gateway API (Recommended)\n\nThe Gateway API is the modern way to manage routing in Kubernetes.\n\n**Prerequisites**: Gateway API must be enabled on the cluster (enabled by\ndefault on new clusters running GKE 1.26+; on older supported versions enable it\nwith `--gateway-api=standard`).\n\n**Templates:**\n\n-   `assets\u002Fgateway.yaml` — external Gateway using the\n    `gke-l7-global-external-managed` GatewayClass with an HTTP listener.\n-   `assets\u002Fhttproute.yaml` — HTTPRoute attaching to the Gateway via\n    `parentRefs` and routing a path prefix to a Service `backendRef`.\n-   `assets\u002Fhttproute-traffic-split.yaml` — HTTPRoute demonstrating weighted\n    traffic splitting (e.g. 90\u002F10) for canary deployments across backend\n    services.\n\n```bash\nkubectl apply -f assets\u002Fgateway.yaml\nkubectl apply -f assets\u002Fhttproute.yaml\n```\n\n**Traffic Splitting (Canary Deployments):**\n\nHTTPRoute supports weighted traffic splitting across multiple backend Services\nfor canary rollouts:\n\n```yaml\nspec:\n  rules:\n    - backendRefs:\n        - name: app-v1\n          port: 80\n          weight: 90\n        - name: app-v2\n          port: 80\n          weight: 10\n```\n\n### 2. Configure Standard GKE Ingress\n\nUse standard Ingress for simpler use cases or legacy setups.\n\n**Template:** `assets\u002Fingress.yaml` — GCE Ingress (`kubernetes.io\u002Fingress.class:\n\"gce\"` annotation) routing to a Service.\n\n### 3. Secure with Cloud Armor\n\nCloud Armor provides WAF and DDoS protection.\n\n1.  Create a Security Policy in Cloud Armor:\n\n    ```bash\n    gcloud compute security-policies create {security_policy_name} \\\n      --description \"WAF policy for {app_name}\"\n\n    # Example rule: block an abusive IP range\n    gcloud compute security-policies rules create 1000 \\\n      --security-policy {security_policy_name} \\\n      --action deny-403 \\\n      --src-ip-ranges \"203.0.113.0\u002F24\" \\\n      --description \"Block abusive range\"\n    ```\n\n2.  Reference it in a `BackendConfig`: `assets\u002Fbackendconfig.yaml` (sets\n    `spec.securityPolicy.name`).\n\n3.  Associate the `BackendConfig` with your `Service` via annotations:\n\n    ```yaml\n    # In your Kubernetes Service manifest metadata.annotations:\n    cloud.google.com\u002Fbackend-config: '{\"default\": \"{backend_config_name}\"}'\n    # Or for specific port mappings:\n    cloud.google.com\u002Fbackend-config: '{\"ports\": {\"80\": \"{backend_config_name}\"}}'\n    ```\n\n### 4. Configure Google-Managed SSL Certificates\n\nAutomatically provision and renew SSL certificates.\n\n**Legacy Ingress approach:** apply `assets\u002Fmanaged-certificate.yaml` (a\n`ManagedCertificate` listing your domains), then reference it in the Ingress\nannotations:\n\n```yaml\nnetworking.gke.io\u002Fmanaged-certificates: {certificate_name}\n```\n\n**Gateway API approach:** for standard Certificate Manager integration, create a\n`CertificateMap` and reference it in the Gateway metadata annotations using the\nexact annotation `networking.gke.io\u002Fcertmap` (spelled without any hyphens in\n`certmap`):\n\n```yaml\nmetadata:\n  annotations:\n    networking.gke.io\u002Fcertmap: {certificate_map_name}\n```\n\n> [!IMPORTANT] The annotation key is strictly `networking.gke.io\u002Fcertmap` (do\n> not use `cert-map` or `certificate-map`).\n\nAlternatively, reference a Kubernetes Secret in the HTTPS listener's\n`tls.certificateRefs`. Both variants are in `assets\u002Fgateway-https.yaml`.\n\n### 5. Enable Container-Native Load Balancing (Recommended)\n\nContainer-native load balancing allows load balancers to target Kubernetes Pods\ndirectly, rather than targeting nodes. This improves latency and distribution.\n\n**Prerequisites**: Cluster must be VPC-native.\n\n**How it works**: the `cloud.google.com\u002Fneg` annotation on a Service triggers\ncreation of a NEG that mirrors the Pod IPs. GKE often adds it for you — but not\nalways, and knowing which case you are in is the whole point.\n\n```yaml\n# In your Kubernetes Service manifest metadata.annotations:\ncloud.google.com\u002Fneg: '{\"ingress\": true}'\n```\n\n**When the annotation is automatic** (do not add it by hand):\n\n-   **Internal Ingress** — container-native load balancing is *always* used, not\n    optional. Internal Ingress always uses `GCE_VM_IP_PORT` NEGs and requires a\n    VPC-native cluster.\n-   **External Ingress**, but only when all four hold: the cluster is\n    VPC-native, is not on Shared VPC, does not use GKE Network Policy, and has\n    the `HttpLoadBalancing` add-on enabled (on by default — do not disable it).\n    GKE then annotates Services automatically.\n\n**When you must add it explicitly**:\n\n-   **Standalone NEGs** — you manage the load balancer yourself instead of\n    letting Ingress own it. Required if the LB must be configured outside GKE,\n    since Ingress overwrites managed load balancer settings on sync or upgrade.\n    You become responsible for every part of the load balancer.\n-   **Any external-Ingress cluster failing one of the four conditions above** —\n    Shared VPC, GKE Network Policy, or non-VPC-native. Enable per Service.\n-   **Legacy configurations** — some older external Ingress objects created on\n    VPC-native clusters still use instance group backends.\n\n**Not supported \u002F no NEG fallback**:\n\n-   Windows Server node pools.\n-   Routes-based (non-VPC-native) clusters with external Ingress — the Ingress\n    controller falls back to unmanaged instance groups spanning all nodes.\n\n> **Scale consequence**: without NEGs a cluster is capped at 1,000 nodes, and\n> non-NEG Services behind Ingress stop functioning correctly beyond that. With\n> NEGs there is no GKE node limit.\n\n### 6. Configure Private Service Connect (PSC)\n\nPrivate Service Connect allows you to expose services in one VPC to consumers in\nanother VPC securely, without VPC peering.\n\n**Prerequisite**: The backing Service must be an internal passthrough Network\nLoad Balancer — i.e. `type: LoadBalancer` with the\n`networking.gke.io\u002Fload-balancer-type: \"Internal\"` annotation. The\n`ServiceAttachment` requires this; a ClusterIP or external LoadBalancer Service\nwill not work.\n\n**Steps:**\n\n1.  Create an internal LoadBalancer Service for your workload.\n2.  Create a `ServiceAttachment` referencing that Service:\n    `assets\u002Fservice-attachment.yaml` (sets `connectionPreference`, the PSC NAT\n    subnet, and the Service `resourceRef`).\n3.  Share the `ServiceAttachment` URI with consumers to create a PSC endpoint in\n    their VPC.\n\n### 7. Topology Aware Routing (Cost & Latency Optimization)\n\nTo minimize cross-zone data transfer costs and network latency, configure\nKubernetes Services with Topology Aware Routing. This routes traffic to Pods in\nthe same zone as the originating client:\n\n```yaml\n# In your Kubernetes Service manifest metadata.annotations:\nservice.kubernetes.io\u002Ftopology-mode: auto\n```\n\n## Troubleshooting\n\nDiagnose Ingress \u002F load-balancer data-plane failures. These map to both Ingress\n(`BackendConfig` \u002F `FrontendConfig`) and Gateway (`GCPBackendPolicy` \u002F\n`HealthCheckPolicy` \u002F `GCPGatewayPolicy`). Stay at the read-only → propose-manifest\nboundary; never apply live mutations directly.\n\n### 502 \u002F 5xx with UNHEALTHY backends (health checks)\n\nThe Google Cloud load-balancer health check is **separate** from Kubernetes\nliveness\u002Freadiness probes — it runs from outside the cluster, so a Pod can be\n`Ready` while the backend service still shows `UNHEALTHY`.\n\n1.  **Allow the Google health-check source ranges** to the node\u002FPod serving port.\n    GKE usually creates this rule automatically, but on Shared VPC or with\n    hand-managed firewalls it can be missing:\n\n    ```bash\n    gcloud compute firewall-rules create allow-lb-health-checks \\\n      --allow tcp:SERVING_PORT \\\n      --source-ranges 130.211.0.0\u002F22,35.191.0.0\u002F16 \\\n      --target-tags NODE_TAG\n    ```\n\n2.  **Point the health check at a healthy endpoint.** If the default `\u002F` returns a\n    non-200, set a custom health check with a `BackendConfig` (Ingress) or a\n    `HealthCheckPolicy` (Gateway):\n\n    ```yaml\n    # BackendConfig (Ingress)\n    spec:\n      healthCheck:\n        requestPath: \u002Fhealthz\n        port: 8080\n        checkIntervalSec: 15\n        timeoutSec: 5\n    ```\n\n3.  Confirm the Service is container-native (NEG) so the check targets Pod IPs\n    rather than nodes (see workflow 5).\n\n### 502 \u002F dropped requests during rollouts or on long requests\n\n-   **Enable connection draining** so in-flight requests finish before a backend\n    Pod is removed during a rolling update or scale-down:\n\n    ```yaml\n    # BackendConfig (Ingress)\n    spec:\n      connectionDraining:\n        drainingTimeoutSec: 60\n    ```\n\n-   **Raise the backend timeout** for slow or streaming responses — a 502\u002F408 on a\n    request that runs longer than the backend response timeout is the classic\n    symptom. Set `timeoutSec` in the `BackendConfig` (Ingress) or `GCPBackendPolicy`\n    (Gateway).\n\n### TLS \u002F SSL handshake failures or weak-cipher enforcement\n\n-   **Ingress:** attach an SSL policy (minimum TLS version \u002F cipher profile) with a\n    `FrontendConfig` `sslPolicy`, and optionally force HTTP→HTTPS with\n    `redirectToHttps`:\n\n    ```yaml\n    # FrontendConfig (external Ingress only)\n    spec:\n      sslPolicy: gke-ingress-ssl-policy\n      redirectToHttps:\n        enabled: true\n    ```\n\n-   **Gateway:** attach the SSL policy name in a `GCPGatewayPolicy`. For a regional\n    Gateway, create and reference a **regional** SSL policy.\n\n## Gotchas\n\n1.  **Certificate Manager API must be enabled** for the\n    `networking.gke.io\u002Fcertmap` annotation to work (`gcloud services enable\n    certificatemanager.googleapis.com`); without it the Gateway fails to\n    provision the certificate map.\n2.  **Regional Gateway classes need a proxy-only subnet**: classes like\n    `gke-l7-regional-external-managed` and `gke-l7-rilb` require a subnet with\n    `--purpose=REGIONAL_MANAGED_PROXY` in the region; the Gateway stays\n    unprogrammed without it.\n3.  **ManagedCertificate provisioning depends on DNS**: the certificate stays in\n    `Provisioning` until the domain's A\u002FAAAA records point at the load balancer\n    IP, and can take 15-60 minutes after DNS is correct.\n\n## References\n\n-   [Ingress features (BackendConfig \u002F FrontendConfig)](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fingress-configuration.md.txt)\n-   [Container-native load balancing (NEGs)](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fload-balance-ingress.md.txt)\n-   [Configure Gateway resources (GCPGatewayPolicy \u002F HealthCheckPolicy \u002F GCPBackendPolicy)](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fconfigure-gateway-resources.md.txt)\n-   [Health check concepts](https:\u002F\u002Fdocs.cloud.google.com\u002Fload-balancing\u002Fdocs\u002Fhealth-check-concepts.md.txt)\n","# GKE Service Networking Skill\n\nThis skill provides workflows for exposing applications running on GKE securely\nto the internet or internal networks.\n\nDeployable manifest templates live in `assets\u002F` — edit the `# Replace ...`\nplaceholders before applying.\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gke-service-networking)\"`\nand append `agent-skills\u002F1.0 (skill:gke-service-networking)` to `User-Agent` headers.\n\n## Workflows\n\n### 1. Configure Gateway API (Recommended)\n\nThe Gateway API is the modern way to manage routing in Kubernetes.\n\n**Prerequisites**: Gateway API must be enabled on the cluster (enabled by\ndefault on new clusters running GKE 1.26+; on older supported versions enable it\nwith `--gateway-api=standard`).\n\n**Templates:**\n\n-   `assets\u002Fgateway.yaml` — external Gateway using the\n    `gke-l7-global-external-managed` GatewayClass with an HTTP listener.\n-   `assets\u002Fhttproute.yaml` — HTTPRoute attaching to the Gateway via\n    `parentRefs` and routing a path prefix to a Service `backendRef`.\n-   `assets\u002Fhttproute-traffic-split.yaml` — HTTPRoute demonstrating weighted\n    traffic splitting (e.g. 90\u002F10) for canary deployments across backend\n    services.\n\n```bash\nkubectl apply -f assets\u002Fgateway.yaml\nkubectl apply -f assets\u002Fhttproute.yaml\n```\n\n**Traffic Splitting (Canary Deployments):**\n\nHTTPRoute supports weighted traffic splitting across multiple backend Services\nfor canary rollouts:\n\n```yaml\nspec:\n  rules:\n    - backendRefs:\n        - name: app-v1\n          port: 80\n          weight: 90\n        - name: app-v2\n          port: 80\n          weight: 10\n```\n\n### 2. Configure Standard GKE Ingress\n\nUse standard Ingress for simpler use cases or legacy setups.\n\n**Template:** `assets\u002Fingress.yaml` — GCE Ingress (`kubernetes.io\u002Fingress.class:\n\"gce\"` annotation) routing to a Service.\n\n### 3. Secure with Cloud Armor\n\nCloud Armor provides WAF and DDoS protection.\n\n1.  Create a Security Policy in Cloud Armor:\n\n    ```bash\n    gcloud compute security-policies create {security_policy_name} \\\n      --description \"WAF policy for {app_name}\"\n\n    # Example rule: block an abusive IP range\n    gcloud compute security-policies rules create 1000 \\\n      --security-policy {security_policy_name} \\\n      --action deny-403 \\\n      --src-ip-ranges \"203.0.113.0\u002F24\" \\\n      --description \"Block abusive range\"\n    ```\n\n2.  Reference it in a `BackendConfig`: `assets\u002Fbackendconfig.yaml` (sets\n    `spec.securityPolicy.name`).\n\n3.  Associate the `BackendConfig` with your `Service` via annotations:\n\n    ```yaml\n    # In your Kubernetes Service manifest metadata.annotations:\n    cloud.google.com\u002Fbackend-config: '{\"default\": \"{backend_config_name}\"}'\n    # Or for specific port mappings:\n    cloud.google.com\u002Fbackend-config: '{\"ports\": {\"80\": \"{backend_config_name}\"}}'\n    ```\n\n### 4. Configure Google-Managed SSL Certificates\n\nAutomatically provision and renew SSL certificates.\n\n**Legacy Ingress approach:** apply `assets\u002Fmanaged-certificate.yaml` (a\n`ManagedCertificate` listing your domains), then reference it in the Ingress\nannotations:\n\n```yaml\nnetworking.gke.io\u002Fmanaged-certificates: {certificate_name}\n```\n\n**Gateway API approach:** for standard Certificate Manager integration, create a\n`CertificateMap` and reference it in the Gateway metadata annotations using the\nexact annotation `networking.gke.io\u002Fcertmap` (spelled without any hyphens in\n`certmap`):\n\n```yaml\nmetadata:\n  annotations:\n    networking.gke.io\u002Fcertmap: {certificate_map_name}\n```\n\n> [!IMPORTANT] The annotation key is strictly `networking.gke.io\u002Fcertmap` (do\n> not use `cert-map` or `certificate-map`).\n\nAlternatively, reference a Kubernetes Secret in the HTTPS listener's\n`tls.certificateRefs`. Both variants are in `assets\u002Fgateway-https.yaml`.\n\n### 5. Enable Container-Native Load Balancing (Recommended)\n\nContainer-native load balancing allows load balancers to target Kubernetes Pods\ndirectly, rather than targeting nodes. This improves latency and distribution.\n\n**Prerequisites**: Cluster must be VPC-native.\n\n**How it works**: the `cloud.google.com\u002Fneg` annotation on a Service triggers\ncreation of a NEG that mirrors the Pod IPs. GKE often adds it for you — but not\nalways, and knowing which case you are in is the whole point.\n\n```yaml\n# In your Kubernetes Service manifest metadata.annotations:\ncloud.google.com\u002Fneg: '{\"ingress\": true}'\n```\n\n**When the annotation is automatic** (do not add it by hand):\n\n-   **Internal Ingress** — container-native load balancing is *always* used, not\n    optional. Internal Ingress always uses `GCE_VM_IP_PORT` NEGs and requires a\n    VPC-native cluster.\n-   **External Ingress**, but only when all four hold: the cluster is\n    VPC-native, is not on Shared VPC, does not use GKE Network Policy, and has\n    the `HttpLoadBalancing` add-on enabled (on by default — do not disable it).\n    GKE then annotates Services automatically.\n\n**When you must add it explicitly**:\n\n-   **Standalone NEGs** — you manage the load balancer yourself instead of\n    letting Ingress own it. Required if the LB must be configured outside GKE,\n    since Ingress overwrites managed load balancer settings on sync or upgrade.\n    You become responsible for every part of the load balancer.\n-   **Any external-Ingress cluster failing one of the four conditions above** —\n    Shared VPC, GKE Network Policy, or non-VPC-native. Enable per Service.\n-   **Legacy configurations** — some older external Ingress objects created on\n    VPC-native clusters still use instance group backends.\n\n**Not supported \u002F no NEG fallback**:\n\n-   Windows Server node pools.\n-   Routes-based (non-VPC-native) clusters with external Ingress — the Ingress\n    controller falls back to unmanaged instance groups spanning all nodes.\n\n> **Scale consequence**: without NEGs a cluster is capped at 1,000 nodes, and\n> non-NEG Services behind Ingress stop functioning correctly beyond that. With\n> NEGs there is no GKE node limit.\n\n### 6. Configure Private Service Connect (PSC)\n\nPrivate Service Connect allows you to expose services in one VPC to consumers in\nanother VPC securely, without VPC peering.\n\n**Prerequisite**: The backing Service must be an internal passthrough Network\nLoad Balancer — i.e. `type: LoadBalancer` with the\n`networking.gke.io\u002Fload-balancer-type: \"Internal\"` annotation. The\n`ServiceAttachment` requires this; a ClusterIP or external LoadBalancer Service\nwill not work.\n\n**Steps:**\n\n1.  Create an internal LoadBalancer Service for your workload.\n2.  Create a `ServiceAttachment` referencing that Service:\n    `assets\u002Fservice-attachment.yaml` (sets `connectionPreference`, the PSC NAT\n    subnet, and the Service `resourceRef`).\n3.  Share the `ServiceAttachment` URI with consumers to create a PSC endpoint in\n    their VPC.\n\n### 7. Topology Aware Routing (Cost & Latency Optimization)\n\nTo minimize cross-zone data transfer costs and network latency, configure\nKubernetes Services with Topology Aware Routing. This routes traffic to Pods in\nthe same zone as the originating client:\n\n```yaml\n# In your Kubernetes Service manifest metadata.annotations:\nservice.kubernetes.io\u002Ftopology-mode: auto\n```\n\n## Troubleshooting\n\nDiagnose Ingress \u002F load-balancer data-plane failures. These map to both Ingress\n(`BackendConfig` \u002F `FrontendConfig`) and Gateway (`GCPBackendPolicy` \u002F\n`HealthCheckPolicy` \u002F `GCPGatewayPolicy`). Stay at the read-only → propose-manifest\nboundary; never apply live mutations directly.\n\n### 502 \u002F 5xx with UNHEALTHY backends (health checks)\n\nThe Google Cloud load-balancer health check is **separate** from Kubernetes\nliveness\u002Freadiness probes — it runs from outside the cluster, so a Pod can be\n`Ready` while the backend service still shows `UNHEALTHY`.\n\n1.  **Allow the Google health-check source ranges** to the node\u002FPod serving port.\n    GKE usually creates this rule automatically, but on Shared VPC or with\n    hand-managed firewalls it can be missing:\n\n    ```bash\n    gcloud compute firewall-rules create allow-lb-health-checks \\\n      --allow tcp:SERVING_PORT \\\n      --source-ranges 130.211.0.0\u002F22,35.191.0.0\u002F16 \\\n      --target-tags NODE_TAG\n    ```\n\n2.  **Point the health check at a healthy endpoint.** If the default `\u002F` returns a\n    non-200, set a custom health check with a `BackendConfig` (Ingress) or a\n    `HealthCheckPolicy` (Gateway):\n\n    ```yaml\n    # BackendConfig (Ingress)\n    spec:\n      healthCheck:\n        requestPath: \u002Fhealthz\n        port: 8080\n        checkIntervalSec: 15\n        timeoutSec: 5\n    ```\n\n3.  Confirm the Service is container-native (NEG) so the check targets Pod IPs\n    rather than nodes (see workflow 5).\n\n### 502 \u002F dropped requests during rollouts or on long requests\n\n-   **Enable connection draining** so in-flight requests finish before a backend\n    Pod is removed during a rolling update or scale-down:\n\n    ```yaml\n    # BackendConfig (Ingress)\n    spec:\n      connectionDraining:\n        drainingTimeoutSec: 60\n    ```\n\n-   **Raise the backend timeout** for slow or streaming responses — a 502\u002F408 on a\n    request that runs longer than the backend response timeout is the classic\n    symptom. Set `timeoutSec` in the `BackendConfig` (Ingress) or `GCPBackendPolicy`\n    (Gateway).\n\n### TLS \u002F SSL handshake failures or weak-cipher enforcement\n\n-   **Ingress:** attach an SSL policy (minimum TLS version \u002F cipher profile) with a\n    `FrontendConfig` `sslPolicy`, and optionally force HTTP→HTTPS with\n    `redirectToHttps`:\n\n    ```yaml\n    # FrontendConfig (external Ingress only)\n    spec:\n      sslPolicy: gke-ingress-ssl-policy\n      redirectToHttps:\n        enabled: true\n    ```\n\n-   **Gateway:** attach the SSL policy name in a `GCPGatewayPolicy`. For a regional\n    Gateway, create and reference a **regional** SSL policy.\n\n## Gotchas\n\n1.  **Certificate Manager API must be enabled** for the\n    `networking.gke.io\u002Fcertmap` annotation to work (`gcloud services enable\n    certificatemanager.googleapis.com`); without it the Gateway fails to\n    provision the certificate map.\n2.  **Regional Gateway classes need a proxy-only subnet**: classes like\n    `gke-l7-regional-external-managed` and `gke-l7-rilb` require a subnet with\n    `--purpose=REGIONAL_MANAGED_PROXY` in the region; the Gateway stays\n    unprogrammed without it.\n3.  **ManagedCertificate provisioning depends on DNS**: the certificate stays in\n    `Provisioning` until the domain's A\u002FAAAA records point at the load balancer\n    IP, and can take 15-60 minutes after DNS is correct.\n\n## References\n\n-   [Ingress features (BackendConfig \u002F FrontendConfig)](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fingress-configuration.md.txt)\n-   [Container-native load balancing (NEGs)](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fload-balance-ingress.md.txt)\n-   [Configure Gateway resources (GCPGatewayPolicy \u002F HealthCheckPolicy \u002F GCPBackendPolicy)](https:\u002F\u002Fdocs.cloud.google.com\u002Fkubernetes-engine\u002Fdocs\u002Fhow-to\u002Fconfigure-gateway-resources.md.txt)\n-   [Health check concepts](https:\u002F\u002Fdocs.cloud.google.com\u002Fload-balancing\u002Fdocs\u002Fhealth-check-concepts.md.txt)\n",{"name":5,"metadata":51,"description":7},{"version":52,"category":53},"1.1.1","Networking","main","bb9b3f464aae37af360d079c1d863524955b0363","skills\u002Fcloud\u002Fgke-service-networking",2014,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills","https:\u002F\u002Fgithub.com\u002Fgoogle","https:\u002F\u002Fopensource.google\u002F","Google ❤️ Open Source","2026-11-14 23:31:00",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add google\u002Fskills --skill gke-service-networking",{"tool":69,"command":70},"bunx","bunx skills add google\u002Fskills --skill gke-service-networking",{"tool":72,"command":73},"pnpm","pnpm dlx skills add google\u002Fskills --skill gke-service-networking","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgke-service-networking\u002FSKILL.md",true,[77,83,87,91,95,99,103,107,111],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"assets\u002Fbackendconfig.yaml","ASSET","资产文件",288,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgke-service-networking\u002Fassets\u002Fbackendconfig.yaml",{"path":84,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":85,"sourceHtmlUrl":86},"assets\u002Fgateway-https.yaml",777,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgke-service-networking\u002Fassets\u002Fgateway-https.yaml",{"path":88,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":89,"sourceHtmlUrl":90},"assets\u002Fgateway.yaml",495,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgke-service-networking\u002Fassets\u002Fgateway.yaml",{"path":92,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":93,"sourceHtmlUrl":94},"assets\u002Fhttproute-traffic-split.yaml",438,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgke-service-networking\u002Fassets\u002Fhttproute-traffic-split.yaml",{"path":96,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":97,"sourceHtmlUrl":98},"assets\u002Fhttproute.yaml",452,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgke-service-networking\u002Fassets\u002Fhttproute.yaml",{"path":100,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":101,"sourceHtmlUrl":102},"assets\u002Fingress.yaml",581,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgke-service-networking\u002Fassets\u002Fingress.yaml",{"path":104,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":105,"sourceHtmlUrl":106},"assets\u002Fmanaged-certificate.yaml",285,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgke-service-networking\u002Fassets\u002Fmanaged-certificate.yaml",{"path":108,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":109,"sourceHtmlUrl":110},"assets\u002Fservice-attachment.yaml",527,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgke-service-networking\u002Fassets\u002Fservice-attachment.yaml",{"path":112,"resourceType":113,"resourceTypeDesc":114,"sizeBytes":115,"sourceHtmlUrl":116},"references\u002Fattribution.md","REFERENCE","参考文档",1906,"https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fgke-service-networking\u002Freferences\u002Fattribution.md",[118,150,180,208,235,260],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":128,"publishedAt":46},"01M6998S2EZKD3GEJ7F943RZTE","sign-in-with-google-web","Implement, configure, and secure Sign In With Google (SiwG) using Google Identity Services (GIS \u002F `https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fclient`) across web architectures. Use when creating Google sign-in buttons, implementing Google One Tap with FedCM, integrating GIS in React\u002FNext.js\u002FAngular\u002FHTML, verifying ID tokens on backend runtimes (Python\u002FNode.js\u002FGo\u002FJava), enforcing Google Workspace domain restrictions (`hd`), securing client-side ID tokens via WebCrypto nonces or encrypted IndexedDB, embedding in cross-origin iframes via the Intermediate Iframe API (`https:\u002F\u002Faccounts.google.com\u002Fgsi\u002Fintermediate`), configuring Content Security Policy (CSP), COOP, and Permissions Policy (`identity-credentials-get`) headers, or handling sign-out and revocation. Don't use for legacy Google Sign-In (`gapi.auth2`), Google Cloud IAM service accounts, or Android\u002FiOS native Credential Manager.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fsign-in-with-google-web\u002FSKILL.md",[124,127],{"categoryNo":125,"categoryName":126,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[9,129,130,131,132,133,134,45,135,136,137,44,138,139,140,141,142,143,144,145,146,147,148,149],"sign in with google web","sign","with","web","android","go","google workspace","google cloud","implement","python","implementing","react","iam","permissions","buttons","secure","manager","identity","architectures","domain","runtimes",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":165,"publishedAt":46},"01M6998PHPDCAD684VW5WRG83D","dpop-adoption","Implement and debug OAuth 2.0 DPoP (RFC 9449) refresh token sender-constraining for WebCrypto, Node.js ES6, and browser runtimes integrating with Google's OAuth platform. Use when configuring non-extractable asymmetric key pairs (P-256), generating DPoP Proof JWTs for authorization code exchange and token refresh, or handling 400 use_dpop_nonce challenge retry loops at oauth2.googleapis.com\u002Ftoken. Don't use for unconstrained OAuth 2.0 flows (where refresh tokens are not bound to a client key pair), or for Google Cloud IAM \u002F service account authentication.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002Fdpop-adoption\u002FSKILL.md",[156,157,160],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":158,"categoryName":159,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":161,"categoryName":162,"taxonomyType":163,"taxonomyTypeDesc":164},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[166,167,9,136,168,169,170,171,172,173,141,174,175,176,37,177,178,146,149,179,29],"dpop adoption","adoption","es6","retry","authentication","flows","challenge","code","browser","loops","at","token","pair","platform",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":192,"publishedAt":46},"01M6998M72TC73EEAQH4XC7EXW","retrieving-developer-knowledge","Searches, retrieves, and synthesizes official Google developer documentation across Google Cloud, AI\u002FGemini, Android, Chrome, Web, Flutter, Go, Firebase, and other Google developer platforms. Integrates with the Developer Knowledge MCP server (search_documents, get_documents, answer_query) or the Developer Knowledge REST API fallback. Use when searching for gcloud CLI commands, API syntax, IAM permissions, official documentation, architectural comparisons, or product choice overviews. Don't use for local filesystem lookups or non-Google documentation.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fretrieving-developer-knowledge\u002FSKILL.md",[186,187,190,191],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":188,"categoryName":189,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":158,"categoryName":159,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":161,"categoryName":162,"taxonomyType":163,"taxonomyTypeDesc":164},[193,194,195,196,136,197,198,199,200,201,202,203,204,29,205,28,206,141,207,142],"retrieving developer knowledge","knowledge","developer","MCP","mcp server","official","developer documentation","get","search","local","choice","documents","query","across","documentation",{"skillNo":209,"name":210,"nameZh":6,"description":211,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":212,"categories":213,"keywords":214,"publishedAt":46},"01M6998J2CZEXS9BES9S3WWFKC","migrate-to-rust","Clones, analyzes, plans, and migrates legacy codebases (C++, Fortran, Java, Python, C, Shell) from a GitHub URL or local directory to a modern, high-performance, deterministic, 100% Safe Rust architecture, tracking live telemetry across every task bucket, test failure\u002Ffix cycle, and Profile-Guided Optimization (PGO) stage, and producing a first-person AI storytelling report and interactive HTML infographic. Use when migrating a GitHub repository or local codebase to Rust, porting legacy C++, Fortran, Python, or Java workloads to memory-safe Rust, designing Struct-of-Arrays (SoA) or SIMD Rust architectures, or optimizing Rust ports with LLVM PGO. Don't use for unrelated non-Rust refactoring or single-line syntax questions.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Fmigrate-to-rust\u002FSKILL.md",[],[215,216,217,218,219,220,221,222,138,223,224,225,226,227,228,202,229,230,231,29,232,233,206,234],"migrate to rust","rust","migrate","github","memory","performance","directory","safe","ports","llvm","soa","cycle","porting","fix","arrays","infographic","high-performance","URL","architecture","unrelated",{"skillNo":236,"name":237,"nameZh":6,"description":238,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":239,"categories":240,"keywords":244,"publishedAt":46},"01M6998GCC3K29WZ82KXMB9E02","finding-google-skills","Google platform decision and setup guidance, loaded on demand from Google's skill catalog. Use when a developer is choosing or setting up part of their stack, such as where to run a service, a database, storage, messaging, authentication, analytics, ads, or AI model serving, and a Google product is a reasonable candidate - whether or not a vendor is named - or when a request names a Google product or API. Brings in the matching Google skill so the answer can weigh Google options, their trade-offs, and when they are not the right fit. Skip when the stack is already settled on another provider and no Google product is named, or the task involves no platform choice.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdevelopers\u002Ffinding-google-skills\u002FSKILL.md",[241,242,243],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":158,"categoryName":159,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":161,"categoryName":162,"taxonomyType":163,"taxonomyTypeDesc":164},[9,245,246,247,248,179,249,250,251,252,253,170,254,255,256,203,257,258,29,259,28],"finding google skills","storage","as","messaging","model","trade-offs","provider","answer","fit","catalog","up","decision","use","database","candidate",{"skillNo":261,"name":262,"nameZh":6,"description":263,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":264,"categories":265,"keywords":268,"publishedAt":46},"01M6998DWNHTH0BS6W1CY8ZXMP","workload-manager-basics","Use this skill to manage Google Cloud Workload Manager evaluations, rules, scanned resources, and validation results by using public client libraries and the REST API. Use when you need to inspect workload best-practice rules, create and run evaluations for Google Cloud general best practices, SAP, SQL Server, or custom organizational rules, review violations, export results to BigQuery, or automate Workload Manager through client libraries because no service-specific public CLI or MCP server is available. Don't use for general Google Compute Engine instance management, VPC configuration, or standard IAM auditing.","https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcloud\u002Fworkload-manager-basics\u002FSKILL.md",[266,267],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":158,"categoryName":159,"taxonomyType":21,"taxonomyTypeDesc":22},[269,270,145,271,9,196,272,136,197,273,274,275,276,29,277,28,141,278,279,280,281],"workload manager basics","workload","basics","cli","review","vpc","resources","inspect","you","create","libraries","server","run"]