All skills
google avatar

/gke-compute-classes

@becc4b8
by googlegoogle/skills21k stars
1,698

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.

Use this Skill: https://skilld.dev/gh/google/skills/gke-compute-classes

This session only. Nothing lands on disk.

referencescompute-class-crd-fields.md

≈1.7k tokens on demand. Your agent reads this file only when SKILL.md points to it.

ComputeClass: CRD Fields & Spec Reference

Full CRD: kubectl describe crd computeclasses.cloud.google.com.

Minimal Shape

apiVersion: cloud.google.com/v1
kind: ComputeClass
metadata: { name: my-class }
spec:
  nodePoolAutoCreation: { enabled: true }
  priorities:
  - machineFamily: n4
    minCores: 16

Top-Level Spec Fields

Field Purpose Default / Note
nodePoolAutoCreation.enabled Enable node pool false
: : auto-creation for : :
: : this ComputeClass. : :
: : **Does NOT require : :
: : cluster-level Node : :
: : Auto Provisioning.** : :
nodePoolAutoCreation.shieldedInstanceConfig Shielded GKE Nodes Optional. Toggles
: : settings for auto- : enableSecureBoot :
: : created pools. : and `enableIntegrity-:
: : : Monitoring` (GKE :
: : : 1.36.3-gke.1244000+).:
nodePoolConfig Defaults for node See below.
: : pool auto-creation : :
: : pools (image, SA, : :
: : labels, taints). : :
priorityDefaults Defaults applied to e.g. zones,
: : all priorities[] : sysctls. :
: : entries. : :
priorities[] Ordered list of Tried top-to-bottom.
: : provisioning : :
: : attempts. : :
autoscalingPolicy Consolidation 1 min floor.
: : thresholds and : :
: : delay. : :
activeMigration Drift logic to Honors PDBs.
: : higher priorities. : :
whenUnsatisfiable Fallback behavior DoNotScaleUp
: : when priorities : (Default). :
: : exhaust. : :

nodePoolConfig (node pool auto-creation Only)

Applied to pools created by the autoscaler.

  • imageType: cos_containerd, ubuntu_containerd (must be lowercase).
  • nodeLabels: Key-value pairs.
  • taints: List of { key, value, effect }. Valid for an intentional dedication taint; keys cannot contain kubernetes.io (GKE Warden rejects it). DO NOT re-add cloud.google.com/compute-class on auto-created pools — GKE applies and auto-tolerates it. (Manual pools, by contrast, REQUIRE it as label + taint to bind.)
  • serviceAccount: Identity for nodes (use custom SA with least privilege, not default).

priorities[] Fields

  • machineFamily / machineType: Intent vs. strict. Prefer family.
  • minCores, minMemoryGb: Lower bounds for intent-based matching.
  • spot: true for Spot, false for On-Demand.
  • location.zones: List of zones to attempt. Cannot combine with reservations.affinity: Specific (error: location config with specific reservations enabled) — with Specific reservations, zones come from reservations.specific[].zones and you keep only a policy-only location.locationPolicy.
  • location.locationPolicy: ANY (default; packs for utilization, tends to fill one zone) or BALANCED (best-effort even node spread across zones at scale-up — infrastructure layer; still scales up if a zone is short). Balances nodes, not pods — for even pod distribution add pod topologySpreadConstraints/DoNotSchedule (workload layer).
  • reservations: affinity: Specific or None.
  • flexStart: { enabled: true } for DWS queued provisioning.
  • gpu / tpu: Accelerator requests (count, type, topology).
  • nodepools: (Standard Only) List of manual pool names to target.
  • nodeSystemConfig:
    • linuxNodeConfig: sysctls (e.g., net.ipv4.tcp_tw_reuse: true, net.core.somaxconn: 4096). Never quote integer or boolean values.
    • kubeletConfig: cpuCfsQuota, podPidsLimit, etc.
  • secondaryBootDisks: Attach secondary boot disks (e.g. pre-warmed container image disks) to auto-provisioned nodes for zero-delay container startup.
  • bootDiskProfile: Performance profile for boot disks (e.g. BALANCED).
  • ephemeralLocalSsdProfile / dedicatedLocalSsdProfile: Intent-based NVMe scratch space profiles.
  • storage: Set bootDiskType, bootDiskSize, and localSSDCount specifically for this priority. Overrides cluster/nodePoolConfig defaults. This is the NODE boot disk, NOT the workload's data PV — for attached PVs use a Kubernetes StorageClass (recommend the built-in dynamic-rwo with use-allowed-disk-topology: "true" on GKE 1.35.3-gke.1290000+; see provisioning methods).

Important Schema Constraints

  • Case Sensitivity: imageType must be lowercase (e.g., cos_containerd).
  • Field Hallucinations: NEVER use spec.description, transparentHugepageEnabled, or shutdownGracePeriodSeconds. They do not exist in the CRD.
  • YAML Formatting: ALWAYS use literal integers for fields like bootDiskSize, minCores, and somaxconn. DO NOT wrap them in quotes.
    • Correct: bootDiskSize: 50
    • Incorrect: bootDiskSize: "50"
  • Storage: Use bootDiskSize, NOT bootDiskSizeGb.

whenUnsatisfiable

  • DoNotScaleUp (Default): Pods stay Pending. Best for specific hardware needs.
  • ScaleUpAnyway: Provisions E2 nodes on Standard with node pool auto-creation. Avoid for specialized workloads.

Source: SKILL.md on GitHub

1 warning9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    This skill provides a robust framework for managing GKE ComputeClasses. It includes security considerations such as the ingestion of external logs and YAML for analysis, which are mitigated by specific instructions to treat user input as untrusted. The use of a shell script to access infrastructure logs is a standard diagnostic practice for cloud management.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: MEDIUM · 1 issue

Signed by skilld at becc4b8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago
metadata
{
  "version": "1.0.0",
  "category": "Containers"
}

README badge

README badge for google/skills/gke-compute-classes