Skillpedia
النشر والسحابة (DevOps)22k · #10296

gke-reliability

ما الذي تفعله

تساعد هذه المهارة وكيل الذكاء الاصطناعي على إعداد التوفر العالي لتطبيقات تعمل على GKE. وهي مخصصة للفرق التي يجب أن تبقى تطبيقاتها تعمل أثناء التحديثات والأعطال.

متى تستخدمها

  • ✓عندما تحتاج إلى إبقاء عدد كاف من الـ pods يعمل أثناء التحديثات بميزانية انقطاع (Pod Disruption Budget).
  • ✓عندما تريد إعداد فحوص liveness أو readiness أو startup لتطبيق GKE.
  • ✓عندما تريد توزيع الـ pods عبر المناطق حتى لا يتوقف كلها بعطل واحد.

رابط المهارة

https://github.com/google/skills/blob/main/skills/cloud/gke-reliability/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/google/skills/blob/main/skills/cloud/gke-reliability/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“تطبيقي يتوقف أثناء ترقيات عقد GKE. كيف أبقيه يعمل؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يضبط الوكيل ميزانيات الانقطاع وفحوص الصحة وقيود التوزيع حتى تبقى الـ pods متاحة أثناء ترقية العقد أو عند فشلها.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

GKE Reliability

Routing Note: To generate Kubernetes YAML manifests (Deployment, StatefulSet, Service, ConfigMap, HTTPRoute, PodDisruptionBudget), open gke-manifest-generation/SKILL.md.

This reference covers high availability and reliability configuration for GKE clusters and workloads.

MCP Tools: get_cluster, get_k8s_resource, describe_k8s_resource, apply_k8s_manifest, list_k8s_events

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-reliability)" and append agent-skills/1.0 (skill:gke-reliability) to User-Agent headers.

Golden Path Reliability Defaults

Setting Golden Path Value Notes
Cluster type Regional (4 zones: Control plane replicated across
: : us-central1-a/b/c/f) : zones :
Upgrade strategy SURGE (maxSurge: 1) Rolling upgrades with extra
: : : capacity :
Auto-repair true Unhealthy nodes replaced
: : : automatically :
Auto-upgrade true Nodes follow control plane
: : : version :
Release channel REGULAR Balanced freshness and stability
Stateful HA Enabled Leader election for stateful
: : : workloads :

Workflows

1. Verify Cluster High Availability

# MCP (preferred)
get_cluster(name="projects/<PROJECT>/locations/<REGION>/clusters/<CLUSTER>",
  readMask="location,locations,nodePools.locations")

# gcloud fallback
gcloud container clusters describe <CLUSTER> --region <REGION> \
  --format="json(location, locations)" \
  --quiet
  • If location is a region (e.g., us-central1), the control plane is regional
  • If locations has multiple entries, nodes span multiple zones

2. Pod Disruption Budgets (PDBs)

PDBs ensure minimum pod availability during voluntary disruptions (node upgrades, autoscaler scale-down).

Check existing PDBs:

# MCP (preferred)
get_k8s_resource(parent="...", resourceType="poddisruptionbudget")

# kubectl fallback
kubectl get pdb --all-namespaces

Create PDB:

apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: my-app-pdb
  namespace: default
spec:
  minAvailable: 2       # Or use maxUnavailable: 1
  selector:
    matchLabels:
      app: my-app

Every production Deployment with 2+ replicas should have a PDB.

3. Health Probes

Every production container should have liveness and readiness probes. Startup probes are recommended for slow-starting apps.

Check existing probes:

# MCP (preferred)
describe_k8s_resource(parent="...", resourceType="deployment", name="<APP>", namespace="<NS>")

# kubectl fallback
kubectl get deployment <APP> -n <NS> -o yaml | grep -E "livenessProbe|readinessProbe|startupProbe"

Recommended probe configuration:

spec:
  containers:
  - name: app
    livenessProbe:
      httpGet:
        path: /healthz
        port: 8080
      initialDelaySeconds: 15
      periodSeconds: 10
      timeoutSeconds: 2
      failureThreshold: 3
    readinessProbe:
      httpGet:
        path: /readyz
        port: 8080
      initialDelaySeconds: 5
      periodSeconds: 5
      timeoutSeconds: 2
      failureThreshold: 3
    startupProbe:             # For slow-starting apps
      httpGet:
        path: /healthz
        port: 8080
      initialDelaySeconds: 10
      periodSeconds: 5
      timeoutSeconds: 2
      failureThreshold: 30    # 30 * 5s = 150s max startup time
  • Readiness: Determines when a pod can accept traffic
  • Liveness: Determines when to restart a container
  • Startup: Disables liveness/readiness until the app is ready (prevents premature restarts)

4. Graceful Shutdown

Ensure applications handle SIGTERM and drain in-flight requests:


الأسئلة الشائعة

هل تكتب ملفات YAML كاملة؟

تشير إلى مهارة توليد الملفات (manifest) لبناء ملفات Kubernetes الكاملة.

ماذا يستخدم إعداد الكلستر في المسار الذهبي؟

يستخدم كلستر إقليميا ينشر مستوى التحكم عبر المناطق، مع ترقيات surge افتراضيا.

هل تغطي التعافي من الكوارث؟

لا. التعافي من الكوارث والنسخ الاحتياطية للكلستر تتولاها مهارة النسخ الاحتياطي.

التفاصيل

الوصف الأصلي من المؤلف

Improves GKE workload reliability, using PDBs, health probes, and topology spread constraints. Use when configuring GKE workload reliability, setting up PDBs, or configuring GKE health probes (liveness, readiness, startup). Don't use for generating K8s YAML manifests (use gke-manifest-generation) or disaster recovery and cluster backups (use gke-backup-dr).

repo: google/skills

الشعبية

نجوم GitHub
22k
الترتيب
#10296
الترخيص
Apache-2.0
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة