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

gke-compute-classes

ما الذي تفعله

تساعد هذه المهارة وكيل الذكاء الاصطناعي على إعداد ComputeClasses في GKE وإصلاحها. وهي مخصصة للفرق التي تريد توفيرا في التكلفة أو مسرّعات محددة أو تحكما في مكان تشغيل أحمال العمل.

متى تستخدمها

  • ✓عندما تريد أجهزة Spot مع احتياط بأجهزة عادية لتوفير المال على GKE.
  • ✓عندما تحتاج أحمال العمل إلى نوع محدد من GPU أو TPU في GKE.
  • ✓عندما تبقى الـ pods في حالة Pending وتحتاج إلى فحص إعدادات ComputeClass.

رابط المهارة

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

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

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

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

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

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

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

“كيف أضبط GKE بحيث تستخدم مهمتي أجهزة Spot، ثم تنتقل إلى الأجهزة العادية عندما ينفد سعة Spot؟”

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

كيف تعمل

يكتب الوكيل إعدادات ComputeClass أو يفحصها لعائلات الأجهزة والمسرّعات والمناطق، ويفحص الشيفرة مفتوحة المصدر عندما لا يكون السلوك موثقا بوضوح.

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

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

<!-- disableFinding(LINE_OVER_80) -->

GKE ComputeClasses

Guidance on configuring, optimizing, and troubleshooting GKE ComputeClasses.

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

When to Use

  • Cost optimization: Spot VMs with on-demand fallback.
  • GPU/TPU workloads: Target specific accelerators (e.g., L4, H100, v5p).
  • Performance tuning: Select specific machine families (c3, c4, n4).
  • Zone targeting: Colocate workloads with zonal resources.

CRITICAL RULES

  • CODE-FIRST VERIFICATION (OPEN-SOURCE CODEBASE): GKE Cluster Autoscaler and ComputeClasses are open-sourced at https://github.com/GoogleCloudPlatform/cluster-autoscaler. When user questions challenge or explore undocumented/subtle behaviors, or when guidance is not explicitly established in this skill, VERIFY BEHAVIOR DIRECTLY IN CODE (via local repository clone or fetching raw files from GitHub). Check git log -S and git blame to identify the exact commit and date when behavior changed, and communicate version/date ranges to the user (e.g. "This behavior changed on July 20, 2026 in upstream commit 129daa3756..."). See references/compute-class-code-index.md for exact package and symbol mappings.

Engagement Rules: Generalized First, Refine Later

ComputeClasses depend on zone availability, CUDs, and workload constraints. Do not block the user's initial request. If asked for YAML/recommendations:

  1. Provide Generalized Answer Immediately: Fulfill request using best practices and placeholders (<YOUR-ZONE-HERE>).
    • CRITICAL CUD RULE: You MUST state that the provided machine families (e.g., N4, C4) are generic best-practice examples. You MUST explicitly state that the final choice of machine family should be aligned with the user's existing Committed Use Discounts (CUDs) or Reservations.
    • CRITICAL CUD EXHAUSTION / CAPACITY QUOTA RULE: When a user asks how to cap a primary machine family to match a Committed Use Discount (CUD) footprint (e.g., 100-core CUD for N4) and automatically spill over excess workload demand to secondary families (N4D, C4), you MUST recommend a CapacityQuota (autoscaling.x-k8s.io/v1beta1, GKE 1.36.2+) targeting cloud.google.com/compute-class: <NAME> and cloud.google.com/machine-family: <PRIMARY_FAMILY> with a cpu: <CUD_CORES> limit. This caps only the primary preferred family without restricting secondary fallback priorities in the ComputeClass (n4d, c4), allowing Cluster Autoscaler to emit noScaleUp and automatically spill over excess demand to uncapped fallback families without pods staying in Pending. Do NOT recommend manual node pool limits or GCE Capacity Reservations for this pattern.
    • YAML REQUIREMENT: Any generated YAML template MUST include a comment near the machineFamily field: # IMPORTANT: Align machineFamily with your existing CUDs/Reservations.
    • MUST label initial YAML as EXAMPLE TEMPLATE - DO NOT DEPLOY.
    • STRICT SCHEMA RULE: NEVER hallucinate fields. Do NOT use spec.description, gvnic, transparentHugepageEnabled, or shutdownGracePeriodSeconds. Use bootDiskSize (NOT bootDiskSizeGb).
    • YAML FORMATTING RULE: NEVER quote integer or boolean values (e.g., use bootDiskSize: 50, not bootDiskSize: "50"). imageType MUST be lowercase.
    • CRITICAL AI/ML RULE: DO NOT recommend Spot instances as the primary priority for AI/ML Inference, even if the workload is stateless. Accelerator node startup latency is severe. The correct priority is: Reservations -> On-Demand -> DWS FlexStart -> Spot.
    • CRITICAL PROVISIONING RULE: Do NOT confuse node pool auto-creation with cluster-level Node Auto Provisioning. Starting with GKE 1.33.3-gke.1136000, `nodePoolAutoCreation.enabl
الأسئلة الشائعة

هل تضبط Node Auto Provisioning على مستوى الكلستر؟

لا. إعداد Node Auto Provisioning على مستوى الكلستر خارج نطاق هذه المهارة.

أي عائلات أجهزة تذكرها؟

تذكر أمثلة مثل عائلات c3 وc4 وn4، ومعالجات GPU مثل L4 وH100.

هل تساعد في وضع أحمال العمل في منطقة معينة؟

نعم. تستطيع استهداف منطقة معينة حتى يعمل الحمل قرب الموارد الموجودة فيها.

التفاصيل

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

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto Provisioning configuration or general GKE cluster creation.

repo: google/skills

الشعبية

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

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

0

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

التعليقات

  • …

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

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