[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D77JFA327X5XGVMGF30JY7":3,"skill-same:01M7D77JFA327X5XGVMGF30JY7":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":28,"commitSha":29,"skillDirectory":5,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7D77JFA327X5XGVMGF30JY7","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.","tangyixiao\u002Ftangyixiao-skills","tangyixiao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F115929632?v=4","01M7D582YK6A4M63CAK4CSY4EW","Tang Yixiao","01M7D582Z64DMRSYR872SR34SA",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-workload-scaling\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-workload-scaling\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: gke-workload-scaling\ndescription: Manages scaling for GKE workloads using HPA and VPA. Use when configuring\n  Horizontal Pod Autoscaler (HPA), configuring Vertical Pod Autoscaler (VPA), or applying\n  best practices for GKE workload autoscaling. Do not use for cluster-level autoscaling\n  (Cluster Autoscaler), static cluster sizing, or configuring node-level machine styles\n  directly.\nmetadata:\n  version: 1.0.1\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## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gke-workload-scaling)\"`\nand append `agent-skills\u002F1.0 (skill:gke-workload-scaling)` to `User-Agent` headers.\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.\n\n**Command:**\n\n```bash\nkubectl scale deployment {deployment_name} --replicas={number} -n {namespace}\n\n# Verify the scale event\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**Quick Command:**\n\n```bash\nkubectl autoscale deployment {deployment_name} --cpu-percent=50 --min=1 --max=10\n```\n\n**Manifest Approach (Recommended):** Use a YAML manifest for version-controlled\nconfiguration. See [assets\u002Fhpa-example.yaml](assets\u002Fhpa-example.yaml) for a\ntemplate.\n\n```bash\nkubectl apply -f assets\u002Fhpa-example.yaml\n\n# Verify HPA is created and fetching metrics\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:**\n\n```bash\ngcloud container clusters update {cluster_name} --enable-vertical-pod-autoscaling --zone {zone}\n```\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.\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.  Deploy VPA in `Off` mode 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.  Use patch format or update deployment manifest to apply new resource\n    requests\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","# 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## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:gke-workload-scaling)\"`\nand append `agent-skills\u002F1.0 (skill:gke-workload-scaling)` to `User-Agent` headers.\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.\n\n**Command:**\n\n```bash\nkubectl scale deployment {deployment_name} --replicas={number} -n {namespace}\n\n# Verify the scale event\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**Quick Command:**\n\n```bash\nkubectl autoscale deployment {deployment_name} --cpu-percent=50 --min=1 --max=10\n```\n\n**Manifest Approach (Recommended):** Use a YAML manifest for version-controlled\nconfiguration. See [assets\u002Fhpa-example.yaml](assets\u002Fhpa-example.yaml) for a\ntemplate.\n\n```bash\nkubectl apply -f assets\u002Fhpa-example.yaml\n\n# Verify HPA is created and fetching metrics\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:**\n\n```bash\ngcloud container clusters update {cluster_name} --enable-vertical-pod-autoscaling --zone {zone}\n```\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.\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.  Deploy VPA in `Off` mode 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.  Use patch format or update deployment manifest to apply new resource\n    requests\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",{"name":5,"metadata":25,"description":7},{"version":26,"category":27},"1.0.1","Containers","main","2a870f189175a48c39f5f7e26a6d93b0be9cd13b",0,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills","https:\u002F\u002Ftangyixiao.github.io\u002Ftangyixiao-skills\u002F","https:\u002F\u002Fgithub.com\u002Ftangyixiao","http:\u002F\u002Fwww.sxyz.net\u002F","I am Tang Yixiao, a student in Shaoxing No.1 High School. I am eager to learn on GitHub and contribute my part to this community.","2026-11-11 15:45:59",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add tangyixiao\u002Ftangyixiao-skills --skill gke-workload-scaling",{"tool":43,"command":44},"bunx","bunx skills add tangyixiao\u002Ftangyixiao-skills --skill gke-workload-scaling",{"tool":46,"command":47},"pnpm","pnpm dlx skills add tangyixiao\u002Ftangyixiao-skills --skill gke-workload-scaling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-workload-scaling\u002FSKILL.md",true,[51,57,61,67,71],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"assets\u002Fhpa-example.yaml","ASSET","资产文件",519,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-workload-scaling\u002Fassets\u002Fhpa-example.yaml",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"assets\u002Fvpa-example.yaml",437,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-workload-scaling\u002Fassets\u002Fvpa-example.yaml",{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"INSTALL-SOURCE.json","REFERENCE","参考文档",520,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-workload-scaling\u002FINSTALL-SOURCE.json",{"path":68,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":16},"LICENSE","许可证",11358,{"path":72,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fattribution.md",1900,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fgke-workload-scaling\u002Freferences\u002Fattribution.md",[76,84,93,101,109,117],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":20},"01M7D8JK8FYBFNNAJXWD89CFH7","xlsx","Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":88,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":20},"01M7D8JG8ERGGQQAMX0DWCG9GR","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","MIT","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":88,"licenseFileUrl":97,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":20},"01M7D8JE672GW3EHSE8EF185M4","writing-fragments","Writing, explore: mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":88,"licenseFileUrl":105,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":20},"01M7D8JBK572YDFMND8Q6CEYJW","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":88,"licenseFileUrl":113,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":20},"01M7D8J5QPWEXX61EGBKYH73R8","writing-clearly-and-concisely","Use when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Applies Strunk's timeless rules for clearer, stronger, more professional writing.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":88,"licenseFileUrl":121,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":20},"01M7D8J36YWC8WZS5DK5AH03CD","writing-beats","Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FSKILL.md",[],[]]