[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7210VDHKX6DKW2Z0NENA9SN":3,"skill-same:01M7210VDHKX6DKW2Z0NENA9SN":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7210VDHKX6DKW2Z0NENA9SN","gke-workload-scaling",null,"Manages scaling for GKE workloads using HPA and VPA. Use when configuring Horizontal Pod Autoscaler (HPA), configuring Vertical Pod Autoscaler (VPA), or applying best practices for GKE workload autoscaling. Do not use for cluster-level autoscaling (Cluster Autoscaler), static cluster sizing, or configuring node-level machine styles directly.","gke-labs\u002Fkube-agents","gke-labs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F197140281?v=4","01M720MEZR8K6WD2WTHNQE346Q","01M720MF0BRA9RGH1QVT4J0M0E",126,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgke-workload-scaling\u002FSKILL.md",[],[],"2026-11-10 18:39:20",false,"---\nname: gke-workload-scaling\ndescription: >-\n  Manages scaling for GKE workloads using HPA and VPA. Use when configuring\n  Horizontal Pod Autoscaler (HPA), configuring Vertical Pod Autoscaler (VPA),\n  or applying best practices for GKE workload autoscaling. Do not use for\n  cluster-level autoscaling (Cluster Autoscaler), static cluster sizing,\n  or configuring node-level machine styles directly.\nmetadata:\n  category: Containers\n---\n\n# GKE Workload Scaling\n\nThis skill provides workflows and best practices for scaling applications on\nGoogle Kubernetes Engine (GKE). It covers manual scaling, Horizontal Pod\nAutoscaling (HPA), and Vertical Pod Autoscaling (VPA).\n\n> A change goes out as a pull request to the GitOps repository, never as a write from here: Kubernetes objects as YAML through `gke-manifest-generation`, cluster settings and other Google Cloud resources as Config Connector YAML through `gcp-config-connector`, opened with `submit-suggestion`. Each profile's config offers only the `gke` MCP server's read tools, and the broker refuses `kubectl` and `gcloud` writes.\n\n## Workflows\n\n### 1. Manual Scaling\n\nScale a deployment to a fixed number of replicas. Useful for immediate manual\nintervention or testing. Set `spec.replicas` in the Deployment's manifest and\npropose it as a pull request through `submit-suggestion`:\n\n```yaml\nspec:\n  replicas: {number}\n```\n\nOnce it applies, verify the scale event:\n\n```bash\nkubectl get deployment {deployment_name} -n {namespace}\n```\n\n### 2. Horizontal Pod Autoscaling (HPA)\n\nAutomatically scale the number of pods based on observed CPU utilization, memory\nutilization, or custom metrics.\n\n**Prerequisites:**\n\n-   Metrics Server must be running (enabled by default on GKE).\n-   Containers clearly define resource requests\u002Flimits.\n\n**Manifest:** Use a YAML manifest for version-controlled configuration,\nproposed as a pull request through `submit-suggestion`. See\n[assets\u002Fhpa-example.yaml](assets\u002Fhpa-example.yaml) for a template (for example\ntarget CPU utilization 50%, `minReplicas: 1`, `maxReplicas: 10`). Once it\napplies, verify the HPA is created and fetching metrics:\n\n```bash\nkubectl get hpa\n```\n\n**Custom Metrics & External Metrics:** For GKE, the modern and recommended\napproach for scaling based on Cloud Monitoring metrics (e.g., Pub\u002FSub queue\nlength) is to use the **External** metric type, which is natively supported by\nthe GKE control plane without requiring the Custom Metrics Adapter. For\napplication-specific metrics exposed via Prometheus, you can use **Google Cloud\nManaged Service for Prometheus** or the Prometheus Adapter.\n\n### 3. Vertical Pod Autoscaling (VPA)\n\nAutomatically adjust the CPU and memory reservations for your pods to match\nactual usage. This is critical for right-sizing workloads.\n\n**Prerequisites:**\n\n-   VPA must be enabled on the cluster.\n    -   **Autopilot:** Enabled by default.\n    -   **Standard:** Must be enabled manually.\n\n**Enable VPA on Standard Cluster:** `spec.verticalPodAutoscaling.enabled: true` on\nthe cluster's `ContainerCluster`, changed as Config Connector YAML through\n`gcp-config-connector`.\n\n**Update Modes:**\n\n-   `Off`: Calculates recommendations but does not apply them. Good for \"dry\n    run\" analysis.\n-   `Initial`: Assigns resources only at pod creation time.\n-   `Auto`: Updates running pods by restarting them if recommendations differ\n    significantly from requests.\n-   `InPlaceOrRecreate`: Attempts to update Pod resources without recreating the\n    Pod. If in-place update is not possible, it reverts to `Auto` mode (requires\n    GKE 1.34+).\n\n**Example:** See [assets\u002Fvpa-example.yaml](assets\u002Fvpa-example.yaml) for a\nconfiguration template, proposed as a pull request through `submit-suggestion`.\n\n## Best Practices\n\n1.  **Define Resource Requests:** HPA and VPA rely on accurate resource\n    requests. Always define them in your container specs.\n2.  **Avoid Metric Conflicts:** Do not configure HPA and VPA to use the same\n    metric (e.g., both CPU). This causes thrashing.\n    -   *Typical Pattern:* HPA on CPU, VPA on Memory.\n3.  **Pod Disruption Budgets (PDBs):** Define PDBs to ensure application\n    availability during scaling events or node upgrades.\n4.  **HPA Lag:** HPA has a stabilization window (default 5 mins) to prevent\n    rapid fluctuation.\n5.  **VPA \"Auto\" Mode Risks:** In \"Auto\" mode, VPA restarts pods to change\n    resources. Ensure your application handles restarts gracefully (e.g.,\n    handles SIGTERM).\n    -   *Note:* By default, VPA requires at least 2 replicas to perform\n        evictions (to prevent a situation where the only running replica is\n        evicted, causing downtime). In GKE 1.22+, you can override this by\n        setting `minReplicas` in `PodUpdatePolicy`.\n\n## Rightsizing Workflow\n\n1.  Propose VPA in `Off` mode as a pull request and let it run for 24+ hours\n2.  Read recommendations: `kubectl describe vpa {deployment_name}-vpa -n\n    {namespace}`\n3.  Compare `target` values against current `requests`\n4.  Apply with 20% buffer: `new_request = target * 1.2`\n5.  Update the deployment manifest with the new resource requests and propose\n    it as a pull request\n\nCondition                     | Recommendation                       | Risk\n----------------------------- | ------------------------------------ | ------\nCPU request >5x P95 actual    | Reduce to `P95 * 1.2`                | Medium\nMemory request >3x P95 actual | Reduce to `P95 * 1.2`                | Medium\nCPU request >2x P95 actual    | Rightsizing with 20% buffer          | Low\nNo resource limits set        | Add limits to prevent noisy-neighbor | Low\n\n\u003C!-- kube-agents: local addition (auto-injected by sync-upstream-skills.py) -->\n\n## Before recommending GPU\u002FTPU or large-shape capacity for a scale-up\n\nBefore recommending capacity for a GPU\u002FTPU or large-shape scale-up, load the\n[capacity-obtainability](..\u002Fcapacity-obtainability\u002FSKILL.md) skill and run its diagnostics: the\nregional quota for the exact accelerator metric, then live obtainability advice for the requested\nshape across zones and provisioning models — and, for a deadline-bound batch scale-up, its\n**Future windows** section (`gcloud beta compute advice calendar-mode`). That skill owns what to\nprobe and how to report it; follow it rather than restating it here.\n","# GKE Workload Scaling\n\nThis skill provides workflows and best practices for scaling applications on\nGoogle Kubernetes Engine (GKE). It covers manual scaling, Horizontal Pod\nAutoscaling (HPA), and Vertical Pod Autoscaling (VPA).\n\n> A change goes out as a pull request to the GitOps repository, never as a write from here: Kubernetes objects as YAML through `gke-manifest-generation`, cluster settings and other Google Cloud resources as Config Connector YAML through `gcp-config-connector`, opened with `submit-suggestion`. Each profile's config offers only the `gke` MCP server's read tools, and the broker refuses `kubectl` and `gcloud` writes.\n\n## Workflows\n\n### 1. Manual Scaling\n\nScale a deployment to a fixed number of replicas. Useful for immediate manual\nintervention or testing. Set `spec.replicas` in the Deployment's manifest and\npropose it as a pull request through `submit-suggestion`:\n\n```yaml\nspec:\n  replicas: {number}\n```\n\nOnce it applies, verify the scale event:\n\n```bash\nkubectl get deployment {deployment_name} -n {namespace}\n```\n\n### 2. Horizontal Pod Autoscaling (HPA)\n\nAutomatically scale the number of pods based on observed CPU utilization, memory\nutilization, or custom metrics.\n\n**Prerequisites:**\n\n-   Metrics Server must be running (enabled by default on GKE).\n-   Containers clearly define resource requests\u002Flimits.\n\n**Manifest:** Use a YAML manifest for version-controlled configuration,\nproposed as a pull request through `submit-suggestion`. See\n[assets\u002Fhpa-example.yaml](assets\u002Fhpa-example.yaml) for a template (for example\ntarget CPU utilization 50%, `minReplicas: 1`, `maxReplicas: 10`). Once it\napplies, verify the HPA is created and fetching metrics:\n\n```bash\nkubectl get hpa\n```\n\n**Custom Metrics & External Metrics:** For GKE, the modern and recommended\napproach for scaling based on Cloud Monitoring metrics (e.g., Pub\u002FSub queue\nlength) is to use the **External** metric type, which is natively supported by\nthe GKE control plane without requiring the Custom Metrics Adapter. For\napplication-specific metrics exposed via Prometheus, you can use **Google Cloud\nManaged Service for Prometheus** or the Prometheus Adapter.\n\n### 3. Vertical Pod Autoscaling (VPA)\n\nAutomatically adjust the CPU and memory reservations for your pods to match\nactual usage. This is critical for right-sizing workloads.\n\n**Prerequisites:**\n\n-   VPA must be enabled on the cluster.\n    -   **Autopilot:** Enabled by default.\n    -   **Standard:** Must be enabled manually.\n\n**Enable VPA on Standard Cluster:** `spec.verticalPodAutoscaling.enabled: true` on\nthe cluster's `ContainerCluster`, changed as Config Connector YAML through\n`gcp-config-connector`.\n\n**Update Modes:**\n\n-   `Off`: Calculates recommendations but does not apply them. Good for \"dry\n    run\" analysis.\n-   `Initial`: Assigns resources only at pod creation time.\n-   `Auto`: Updates running pods by restarting them if recommendations differ\n    significantly from requests.\n-   `InPlaceOrRecreate`: Attempts to update Pod resources without recreating the\n    Pod. If in-place update is not possible, it reverts to `Auto` mode (requires\n    GKE 1.34+).\n\n**Example:** See [assets\u002Fvpa-example.yaml](assets\u002Fvpa-example.yaml) for a\nconfiguration template, proposed as a pull request through `submit-suggestion`.\n\n## Best Practices\n\n1.  **Define Resource Requests:** HPA and VPA rely on accurate resource\n    requests. Always define them in your container specs.\n2.  **Avoid Metric Conflicts:** Do not configure HPA and VPA to use the same\n    metric (e.g., both CPU). This causes thrashing.\n    -   *Typical Pattern:* HPA on CPU, VPA on Memory.\n3.  **Pod Disruption Budgets (PDBs):** Define PDBs to ensure application\n    availability during scaling events or node upgrades.\n4.  **HPA Lag:** HPA has a stabilization window (default 5 mins) to prevent\n    rapid fluctuation.\n5.  **VPA \"Auto\" Mode Risks:** In \"Auto\" mode, VPA restarts pods to change\n    resources. Ensure your application handles restarts gracefully (e.g.,\n    handles SIGTERM).\n    -   *Note:* By default, VPA requires at least 2 replicas to perform\n        evictions (to prevent a situation where the only running replica is\n        evicted, causing downtime). In GKE 1.22+, you can override this by\n        setting `minReplicas` in `PodUpdatePolicy`.\n\n## Rightsizing Workflow\n\n1.  Propose VPA in `Off` mode as a pull request and let it run for 24+ hours\n2.  Read recommendations: `kubectl describe vpa {deployment_name}-vpa -n\n    {namespace}`\n3.  Compare `target` values against current `requests`\n4.  Apply with 20% buffer: `new_request = target * 1.2`\n5.  Update the deployment manifest with the new resource requests and propose\n    it as a pull request\n\nCondition                     | Recommendation                       | Risk\n----------------------------- | ------------------------------------ | ------\nCPU request >5x P95 actual    | Reduce to `P95 * 1.2`                | Medium\nMemory request >3x P95 actual | Reduce to `P95 * 1.2`                | Medium\nCPU request >2x P95 actual    | Rightsizing with 20% buffer          | Low\nNo resource limits set        | Add limits to prevent noisy-neighbor | Low\n\n\u003C!-- kube-agents: local addition (auto-injected by sync-upstream-skills.py) -->\n\n## Before recommending GPU\u002FTPU or large-shape capacity for a scale-up\n\nBefore recommending capacity for a GPU\u002FTPU or large-shape scale-up, load the\n[capacity-obtainability](..\u002Fcapacity-obtainability\u002FSKILL.md) skill and run its diagnostics: the\nregional quota for the exact accelerator metric, then live obtainability advice for the requested\nshape across zones and provisioning models — and, for a deadline-bound batch scale-up, its\n**Future windows** section (`gcloud beta compute advice calendar-mode`). That skill owns what to\nprobe and how to report it; follow it rather than restating it here.\n",{"name":5,"metadata":23,"description":7},{"category":24},"Containers","main","af354bf2b99e17df77e52c512a7ba968c37c2306","agents\u002Fplatform\u002Fskills\u002Fgke-workload-scaling",44,"https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents","https:\u002F\u002Fgke-labs.github.io\u002Fkube-agents\u002F","https:\u002F\u002Fgithub.com\u002Fgke-labs","2026-11-14 20:53:19",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add gke-labs\u002Fkube-agents --skill gke-workload-scaling",{"tool":39,"command":40},"bunx","bunx skills add gke-labs\u002Fkube-agents --skill gke-workload-scaling",{"tool":42,"command":43},"pnpm","pnpm dlx skills add gke-labs\u002Fkube-agents --skill gke-workload-scaling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgke-workload-scaling\u002FSKILL.md",true,[47,53],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"assets\u002Fhpa-example.yaml","ASSET","资产文件",519,"https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgke-workload-scaling\u002Fassets\u002Fhpa-example.yaml",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"assets\u002Fvpa-example.yaml",437,"https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgke-workload-scaling\u002Fassets\u002Fvpa-example.yaml",[58,65,72,77,84,91],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M72168JZM6CYRZFWW204PA2V","gke-workload-troubleshooting","Diagnoses GKE workload failures (CrashLoopBackOff, OOMKilled, ImagePullBackOff, Pending, etc.) via logs and events. Use when pods fail to start or crash repeatedly. Don't use for GKE cluster infrastructure provisioning, node pool creation, or non-Kubernetes Google Cloud services.","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-troubleshooting\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M721643JPG43MFDHGN067D7T","gke-workload-security","Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running security audits (`audit_cluster.sh`), enforcing Network Policies (default-deny and Dataplane V2 logging), isolating high-risk pods inside GKE Sandbox (`gVisor`), enforcing Pod Security Standards (`restricted` labeling) and pod securityContext, and mounting Secret Manager secrets via CSI (`SecretProviderClass`). Use when auditing workload security posture, isolating namespaces, applying pod security standards, or configuring network policies and secret volume mounts. Don't use for Workload Identity (use gke-workload-identity), cluster-wide control plane security, RBAC hardening, Binary Authorization, Shielded Nodes, or enabling platform-level GKE add-ons (use gke-platform-security instead).","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-security\u002FSKILL.md",[],[],{"skillNo":73,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M721618QGFKZRWHS0RFVG7WT","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-scaling\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7215WA1TNFDZE22VJEN3XXW","gke-workload-identity","Configures and diagnoses Workload Identity Federation for GKE authentication failures for Pods (403 \"iam.serviceAccounts.getAccessToken\" \u002F permission denied, \"could not find default credentials\", or GKE metadata server unreachable) by verifying cluster and node-pool Workload Identity configuration, the Kubernetes ServiceAccount (KSA) to IAM binding (direct principal binding and legacy Google ServiceAccount impersonation), target-resource IAM roles, and gke-metadata-server health. Use when setting up KSA\u002FGSA bindings (`roles\u002Fiam.workloadIdentityUser`, `iam.gke.io\u002Fgcp-service-account`) or when a Pod cannot authenticate to Google Cloud APIs. Don't use for in-cluster Kubernetes RBAC errors (API-server authorization), general workload crashes (use gke-workload-troubleshooting), or Pod Security Standards and NetworkPolicies (use gke-workload-security).","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-identity\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M7215PJTBTZ0W15ZZ2W32FF9","gke-upgrades","Plans, executes, and validates Google Kubernetes Engine (GKE) cluster upgrades and maintenance operations for both Standard and Autopilot clusters. Produces upgrade plans, pre\u002Fpost-upgrade checklists, maintenance runbooks with gcloud commands, release channel strategy, and troubleshooting guides. Handles node pool upgrade strategies (surge, blue-green), version compatibility, PDB management, and workload-specific concerns (stateful, GPU, operators). Use this skill whenever the user mentions GKE upgrades, Kubernetes version bumps, node pool maintenance, GKE patching, cluster version management, release channel selection, maintenance windows, surge upgrades, stuck upgrades, or any GKE lifecycle management task — even casual mentions like \"we need to upgrade our clusters\" or \"plan our next GKE maintenance\" or \"our upgrade is stuck.\" Don't use for GKE cluster creation, application onboarding, general networking\u002Frouting setup, or security policy configurations (use gke-basics or relevant GKE skills instead).","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-upgrades\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":18},"01M7215JX0FBZBTG4570CJ20HS","gke-tpu-metrics-monitoring","Monitors and troubleshoots GKE TPU workloads, nodes, and node pools using GKE system metrics and PromQL. Use when monitoring TensorCore duty cycle, TPU memory, node readiness, multi-host TPU node pool availability, host maintenance or preemption interruptions, and calculating MTTR or MTBI metrics for GKE TPUs. Don't use for general non-TPU GKE workload monitoring or non-metric TPU debugging.","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-tpu-metrics-monitoring\u002FSKILL.md",[],[]]