Loading...
Loading...
Configures GKE autoscaling, including HPA, VPA, and Node Auto-Provisioning (NAP). Use when configuring GKE autoscaling, setting up GKE HPA, setting up GKE VPA, or configuring GKE NAP. Don't use for configuring static cluster sizes or setting node-level machine styles directly (use gke-compute-classes instead).
npx skill4agent add google/skills gke-scalingMCP Tools:,get_k8s_resource,describe_k8s_resource,apply_k8s_manifest,patch_k8s_resource,get_cluster,update_clusterupdate_node_pool
| Setting | Golden Path Value | Notes |
|---|---|---|
| | Aggressive scale-down for cost savings |
| | VPA recommendations available |
| | NAP creates node pools on demand |
| GPU resource limits (T4, A100) | | NAP can provision GPU nodes |
kubectl-only — no MCP equivalent for. Use kubectl directly.kubectl scale
kubectl scale deployment <DEPLOYMENT> --replicas=<N> -n <NAMESPACE>kubectl autoscalekubectl autoscale deployment <DEPLOYMENT> --cpu-percent=50 --min=1 --max=10apply_k8s_manifestapiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: <DEPLOYMENT>-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: <DEPLOYMENT>
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50OffInitialAutoInPlaceOrRecreateapiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: <DEPLOYMENT>-vpa
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: <DEPLOYMENT>
updatePolicy:
updateMode: "Off"describe_k8s_resource# MCP (preferred)
describe_k8s_resource(parent="...", resourceType="verticalpodautoscaler", name="<DEPLOYMENT>-vpa", namespace="<NAMESPACE>")
# kubectl fallback
kubectl get vpa <DEPLOYMENT>-vpa -o jsonpath='{.status.recommendation}'# Enable cluster autoscaler on a node pool
gcloud container clusters update <CLUSTER_NAME> --region <REGION> \
--enable-autoscaling --node-pool <POOL_NAME> \
--min-nodes <MIN> --max-nodes <MAX> \
--quiet
# Enable NAP
gcloud container clusters update <CLUSTER_NAME> --region <REGION> \
--enable-autoprovisioning \
--min-cpu <MIN_CPU> --max-cpu <MAX_CPU> \
--min-memory <MIN_MEM> --max-memory <MAX_MEM> \
--quiet| Profile | Behavior | Golden Path? |
|---|---|---|
| Default GKE; conservative scale-down | No |
| Aggressive scale-down; lower idle | Yes |
| : : resources : : |
behaviorOffkubectl describe vpa <NAME>targetrequestsnew_request = target * 1.2| Condition | Recommendation | Risk |
|---|---|---|
| CPU request >5x P95 actual | Reduce to | Medium |
| Memory request >3x P95 actual | Reduce to | Medium |
| CPU request >2x P95 actual | Rightsizing with 20% buffer | Low |
| No resource limits set | Add limits to prevent noisy-neighbor | Low |