Loading...
Loading...
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.
npx skill4agent add google/skills gke-compute-classes<YOUR-ZONE-HERE>machineFamily# IMPORTANT: Align machineFamily with your existing CUDs/ReservationsEXAMPLE TEMPLATE - DO NOT DEPLOYspec.descriptiongvnictransparentHugepageEnabledshutdownGracePeriodSecondsbootDiskSizebootDiskSizeGbbootDiskSize: 50bootDiskSize: "50"imageTypeReservations -> On-Demand -> DWS FlexStart -> Spot1.33.3-gke.1136000nodePoolAutoCreation.enabled: truecloud.google.com/compute-classdedicated=ml:NoSchedulenodePoolConfig.taintscloud.google.com/compute-class=<NAME>nodePoolConfig.taintskubernetes.iostartup-taint.status-taint.cluster-autoscaler.kubernetes.io/nvidia.com/gpu:NoSchedulecloud.google.com/compute-classPendingnoScaleUptolerations: [{key: nvidia.com/gpu, operator: Exists}]cloud.google.com/gke-spot=true:NoSchedulePendingnoScaleUptolerations: [{key: cloud.google.com/gke-spot, operator: Equal, value: "true", effect: NoSchedule}]priorityScorepriorities[]dynamic-rwotype: dynamicuse-allowed-disk-topology: "true"dynamic-rwo-storageclass.yamlprivilegedhostNetworkhostPIDhostIPCPERFMONSYS_PTRACEBPFNET_ADMINprivileged: trueprivileged# SYSTEM NOTE FOR ASSISTANTbootDiskSizeGbEXAMPLE TEMPLATE - DO NOT DEPLOYbootDiskSizenodePoolConfigserviceAccountactiveMigrationlocationPolicy: BALANCEDtopologySpreadConstraintsout.of.resourcesPendinglocation.locationPolicy: BALANCEDANYtopologySpreadConstraintsmaxSkew:1topologyKey: topology.kubernetes.io/zonewhenUnsatisfiable: DoNotScheduleScheduleAnywaygke-cluster-autoscalerlocation.zonesreservations.affinity: Specificlocation.zoneslocation.locationPolicyreservations.specific[].zonespriorities[]reservations.specific[]specific[]namezonespriorityScorebalanced-reserved-zonal-compute-class.yamlout_of_resourcesZONE_RESOURCE_POOL_EXHAUSTEDgke-cluster-autoscalerpriorities[]BALANCEDoptimizeRulePrioritykube-systemmaxUnavailable: 0dynamic-rwodynamic-rwotype: dynamicuse-allowed-disk-topology: "true"WaitForFirstConsumerpriorities[]priorities[].storage.bootDiskTypedynamic-rwo-storageclass.yamlreservations.affinity: AnyBestEffortAutomaticSpecificwhenUnsatisfiablenodeSelectormachine-family: c4PendingnoScaleUpcloud.google.com/machine-family: c4node.kubernetes.io/instance-type: n4-standard-16cloud.google.com/compute-class: <NAME>priorities[]nvidia.com/gpu: Existsweightpriorities[]nodePoolConfigcompute-class-karpenter-migration.mdClusterRoleClusterRoleBindingRoleapiGroups: ["cloud.google.com"]resources: ["computeclasses"]createupdatepatchdeletenamespacePolicyallowedNamespacesnodeSelectornodeAffinitytolerationsoperator: ExistsmatchConstraintsvalidationActions: [Deny, Audit]failurePolicy: FailnamespaceSelectorcompute-class-governance.mdcomputeclass-rbac-editor.yamlrestrict-computeclass-usage-vap.yamlautopilotautopilot-spotnodeSelector: cloud.google.com/compute-class: autopilotcloud.google.com/default-compute-class=autopilotmachineFamilyGPUTPUspec.autopilot.enabled: truepodFamilymachineFamilymachineTypegpuscompute-class-autopilot-mode.mdautopilotComputeClasskubectl get crd computeclasses.cloud.google.comspec:
nodeSelector:
cloud.google.com/compute-class: "<compute-class-name>"cloud.google.com/gke-spotactiveMigration: trueterminationGracePeriodSecondsprioritiesnodePoolConfigwhenUnsatisfiablenodeSystemConfigpriorityScoreactiveMigrationAnyBestEffortScaleUpAnywayautopilotautopilot-spotspec.autopilot.enabledClusterRoleValidatingAdmissionPolicyassets/log-autoscaler-events.shassets/*.yamlassets/dynamic-rwo-storageclass.yamldynamic-rwoassets/computeclass-rbac-editor.yamlassets/restrict-computeclass-usage-vap.yaml