gke-compute-class-creator
Installation
SKILL.md
Creating 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.
Related skills
More from googlecloudplatform/gke-mcp
gke-backup-dr
Workflows for configuring Backup for GKE and disaster recovery.
2gke-reliability
Workflows for ensuring high availability and reliability of GKE workloads.
2gke-storage
Guidance on managing storage in Google Kubernetes Engine (GKE) clusters.
2gke-app-onboarding
Workflows for containerizing and deploying applications to GKE for the first time.
2gke-workload-security
Workflows for auditing and hardening the security of GKE workloads.
2gke-cost-optimization
Guidance on optimizing costs for Google Kubernetes Engine (GKE) clusters.
2