G
gke-compute-class-creator
About gke-compute-class-creator
A skill for constructing GKE ComputeClass resources, intended for GKE users who need declarative node configuration and autoscaling behavior. It builds and validates YAML based on cost, performance, or AI/ML requirements and provides an apply command.
Key features
- 01Choose a strategy from requirements
- 02Set Spot priorities and fallbacks
- 03Specify machine family or type
- 04Configure GPU or TPU fields
- 05Build and validate YAML manifests
Use cases
- 01Set Spot fallbacks for cost optimization
- 02Choose machine settings for performance
- 03Configure node resources for AI/ML
- 04Create a ComputeClass and apply it to a cluster
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ googlecloudplatform/ gke-mcp --skill gke-compute-class-creatorAfter installing, type/gke-compute-class-creatorin Claude Code to confirm it loaded.
Bundled filesreferences/compute-class-examples.mdreferences/compute-class-spec.md
Details
From the project READMECreating GKE ComputeClasses
This skill helps you construct ComputeClass resources for Google Kubernetes Engine (GKE). ComputeClasses allow for declarative node configuration and sophisticated autoscaling behaviors like fallback priorities and active migration.
Workflow
- Analyze Requirements: Determine the user's goals (Cost optimization? Specific hardware? High availability?).
- Select Strategy:
- Cost Optimization: Use
spot: trueas a high priority, withspot: falseas a fallback. - Performance: Select specific
machineFamily(e.g.,c3,c4) ormachineType. - AI/ML: Configure
gpuortpufields.
- Cost Optimization: Use
- Construct YAML: Use the references below to build the
ComputeClassmanifest. - Validate: Ensure all fields comply with the specification.
- Apply: Provide the user with the
kubectl apply -f <filename>.yamlcommand.
References
- Specification: Detailed breakdown of the
ComputeClassCRD fields (priorities,machineFamily,gpu, etc.). - Examples: Copy-pasteable YAML patterns for common scenarios (Spot fallback, GPU, Zonal).
Usage Tips
- Active Migration: If the user wants to automatically move back to Spot VMs when they become available, ensure
spec.activeMigration.optimizeRulePriorityis set totrue. - Node Selection: Remind the user that to use the class, their Pods must specify:
nodeSelector: cloud.google.com/compute-class: "<class-name>" - Conflict Warning: Advise against mixing
ComputeClassselection with other hard node selectors (likecloud.google.com/gke-spot) as this can lead to scheduling conflicts.
Comments
Markdown supported