gke-service-networking
Fungsinya
Skill ini membantu agent AI mengatur bagaimana aplikasi di Google Kubernetes Engine bisa dijangkau, baik dari internet maupun dari jaringan privat. Cocok untuk tim yang mempublikasikan aplikasi GKE dengan perutean dan load balancing.
Kapan dipakai
- βSaat Anda ingin mempublikasikan aplikasi GKE dengan Gateway API atau Ingress standar.
- βSaat Anda perlu mengatur kebijakan keamanan Cloud Armor atau sertifikat SSL yang dikelola Google.
- βSaat Ingress atau load balancer mengembalikan error 502 atau 5xx lainnya di GKE.
Link skill
https://github.com/google/skills/blob/main/skills/cloud/gke-service-networking/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βAplikasi GKE saya mengembalikan error 502 melalui load balancer. Bagaimana cara mengatur perutean dan memperbaikinya?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memakai templat siap pakai untuk gateway, rute, dan pembagian lalu lintas, serta memeriksa health check dan pengaturan backend ketika muncul error.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
GKE Service Networking Skill
This skill provides workflows for exposing applications running on GKE securely to the internet or internal networks.
Deployable manifest templates live in assets/ β edit the # Replace ...
placeholders before applying.
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-service-networking)"
and append agent-skills/1.0 (skill:gke-service-networking) to User-Agent headers.
Workflows
1. Configure Gateway API (Recommended)
The Gateway API is the modern way to manage routing in Kubernetes.
Prerequisites: Gateway API must be enabled on the cluster (enabled by
default on new clusters running GKE 1.26+; on older supported versions enable it
with --gateway-api=standard).
Templates:
assets/gateway.yamlβ external Gateway using thegke-l7-global-external-managedGatewayClass with an HTTP listener.assets/httproute.yamlβ HTTPRoute attaching to the Gateway viaparentRefsand routing a path prefix to a ServicebackendRef.assets/httproute-traffic-split.yamlβ HTTPRoute demonstrating weighted traffic splitting (e.g. 90/10) for canary deployments across backend services.
kubectl apply -f assets/gateway.yaml
kubectl apply -f assets/httproute.yaml
Traffic Splitting (Canary Deployments):
HTTPRoute supports weighted traffic splitting across multiple backend Services for canary rollouts:
spec:
rules:
- backendRefs:
- name: app-v1
port: 80
weight: 90
- name: app-v2
port: 80
weight: 10
2. Configure Standard GKE Ingress
Use standard Ingress for simpler use cases or legacy setups.
Template: assets/ingress.yaml β GCE Ingress (kubernetes.io/ingress.class: "gce" annotation) routing to a Service.
3. Secure with Cloud Armor
Cloud Armor provides WAF and DDoS protection.
Create a Security Policy in Cloud Armor:
gcloud compute security-policies create {security_policy_name} \ --description "WAF policy for {app_name}" # Example rule: block an abusive IP range gcloud compute security-policies rules create 1000 \ --security-policy {security_policy_name} \ --action deny-403 \ --src-ip-ranges "203.0.113.0/24" \ --description "Block abusive range"Reference it in a
BackendConfig:assets/backendconfig.yaml(setsspec.securityPolicy.name).Associate the
BackendConfigwith yourServicevia annotations:# In your Kubernetes Service manifest metadata.annotations: cloud.google.com/backend-config: '{"default": "{backend_config_name}"}' # Or for specific port mappings: cloud.google.com/backend-config: '{"ports": {"80": "{backend_config_name}"}}'
4. Configure Google-Managed SSL Certificates
Automatically provision and renew SSL certificates.
Legacy Ingress approach: apply assets/managed-certificate.yaml (a
ManagedCertificate listing your domains), then reference it in the Ingress
annotations:
networking.gke.io/managed-certificates: {certificate_name}
Gateway API approach: for standard Certificate Manager integration, create a
CertificateMap and reference it in the Gateway metadata annotations using the
exact annotation networking.gke.io/certmap (spelled without any hyphens in
certmap):
metadata:
annotations:
networking.gke.io/certmap: {certificate_map_name}
[!IMPORTANT] The annotation key is strictly
networking.gke.io/certmap(do not usecert-maporcertificate-map).
Alternatively, reference a Kubernetes Secret in the HTTPS listener's
tls.certificateRefs. Both variants are in assets/gateway-https.yaml.
5. Enable Container-Native Load Balancing (Recommended)
Container-native load balancing allows load balancers to target Kubernetes Pods directly, rather than targeting nodes. This improves latency and distribution.
Prerequisites: Cluster must be VPC-native.
How it works: the cloud.google.com/neg annotation on a Service triggers
creation of a NEG that mirrors the Pod IPs. GKE often adds it for you β but not
always, and knowing which case you are in
Pertanyaan umum
Metode perutean apa yang direkomendasikan?
Skill menyatakan Gateway API adalah cara modern untuk mengelola perutean di Kubernetes.
Apakah ia bisa membagi lalu lintas antar versi?
Bisa. Skill mencakup templat untuk pembagian lalu lintas berbobot.
Apakah ia mencakup akses layanan privat?
Ya. Skill mencakup Private Service Connect untuk endpoint layanan privat.
Detail
Deskripsi asli dari pembuat
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/5xx errors, backend health-check failures, connection draining, and TLS/SSL policy enforcement. Don't use for core cluster IP planning, Dataplane V2 network policies, or node NAT egress (use gke-networking instead).
repo: google/skills
Popularitas
- Bintang GitHub
- 22k
- Peringkat
- #10297
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
finding-google-skills
22kMembantu agent Anda menemukan panduan Google yang tepat untuk tugas pengaturan, seperti hosting, database, penyimpanan, login, atau penyajian model AI.
gcloud
22kMembantu agent Anda menulis dan memeriksa perintah gcloud Google Cloud, dengan mencari sintaks yang tepat sebelum menjalankan apa pun agar tidak menebak flag.
google-cloud-recipe-auth
22kMemandu agent Anda melalui identitas dan akses Google Cloud, termasuk cara orang dan layanan masuk serta izin apa yang mereka dapatkan.
google-cloud-recipe-onboarding
22kMemandu pengembang baru melalui langkah pertama di Google Cloud, termasuk memilih proyek, menautkan penagihan, dan men-deploy sumber daya pertama.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.