Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add kudig-io/kudig-database --skill k8s-autoscalinggit clone --depth 1 https://github.com/kudig-io/kudig-databaseWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kudig-io/kudig-database/k8s-autoscaling)<a href="https://agentmods.dev/skills/kudig-io/kudig-database/k8s-autoscaling"><img src="https://agentmods.dev/badge/skills/kudig-io/kudig-database/k8s-autoscaling/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kudig-io/kudig-database/k8s-autoscaling"><img src="https://agentmods.dev/badge/skills/kudig-io/kudig-database/k8s-autoscaling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00021 | $0.04335 |
| Opus 5.5 | $0.00008 | $0.01734 |
| Sonnet 5.5 | $0.00004 | $0.00867 |
| Haiku 4.5 | $0.00002 | $0.00434 |
Grade A, and why
k8s-autoscaling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 342 lines — stays where its author put it; the contents beside it link to each section on GitHub.
生产环境安全提示
本文档包含可直接执行的运维命令。执行前请确认:当前目标集群与 Namespace 是否正确;是否具备足够的 RBAC 权限;是否已在非生产环境验证。命令风险等级标注:🔴 高风险(可能造成数据丢失或服务中断)、🟡 中风险(会修改集群状态,但通常可回滚)、🟢 低风险/只读(信息收集,无副作用)。
K8s Autoscaling Failure 诊断与修复
HPA、VPA 和 Cluster Autoscaler 是 [[kubernetes|Kubernetes]] 弹性能力的核心组件。当自动扩缩容不工作时,应用可能因负载突增而响应缓慢,或因资源浪费而成本过高。
本 [[SKILL|Skill]] 覆盖 HPA 无法获取指标、VPA 推荐不生效、Cluster Autoscaler 无法扩展节点等全部常见根因的诊断和修复。
何时使用此 Skill
| 症状 | 检测方法 | 置信度 |
|---|---|---|
HPA TARGET 显示 <unknown> |
kubectl get hpa |
0.95 |
| HPA 不随负载变化扩缩容 | 压测时观察 kubectl get hpa |
0.90 |
| ClusterAutoscaler Pod 异常 | `kubectl get [[Pods | pods]] -n kube-system |
| VPA recommendation 为空 | kubectl get vpa |
0.85 |
unable to get metrics 事件 |
kubectl describe hpa |
0.95 |
排除条件: 节点 NotReady → SKILL-NODE-001; 资源配额 → SKILL-RBAC-001
快速分级(2 分钟内完成)
影响范围
├── 核心服务高负载无法扩容 ──────→ P0(15min 内修复)
├── 生产环境成本异常(无法缩容) ─→ P1(30min 内修复)
├── 新 HPA/VPA 规则不生效 ──────→ P2(2h 内修复)
└── 测试环境扩缩容问题 ──────────→ P3(4h 内处理)
立即升级条件:
- 核心服务因无法扩容导致大面积超时
- Cluster Autoscaler 导致节点异常增加/减少
- metrics-server 完全不可用
执行流程
# 🟢 低风险:只读/信息收集,通常无副作用
工单/告警触发
│
▼
┌──────────────┐ 脚本: scripts/diagnose-quick.sh
│ Phase 1 │ 内容: kubectl 快速检查(只读)
│ 快速检查 │ Step: D1.1-D1.5
└──────┬───────┘
│ 确认根因
▼
┌──────────────┐ 参考: reference/remediation-playbook.md
│ 修复操作 │ 风险: LOW → MEDIUM → HIGH
│ REM-001~005 │
└──────┬───────┘
│
▼
┌──────────────┐ 脚本: scripts/verify-autoscaling.sh
│ 验证确认 │ 检查: HPA/VPA/CA 状态
└──────────────┘
可用脚本
| 脚本 | 用途 | 参数 | 风险 |
|---|---|---|---|
scripts/diagnose-quick.sh |
自动扩缩容快速诊断 | NAMESPACE HPA_NAME (optional) |
只读 |
scripts/verify-autoscaling.sh |
修复后验证 | NAMESPACE HPA_NAME (optional) |
只读 |
根因概览 (5 种)
| RC ID | 根因 | 概率 | 首选修复 | 风险 |
|---|---|---|---|---|
| RC-001 | metrics-server 未安装或异常 | 高 | REM-001 修复 metrics-server | MEDIUM |
| RC-002 | HPA 指标配置错误 | 高 | REM-002 修正 HPA 配置 | LOW |
| RC-003 | VPA admission webhook 问题 | 中 | REM-003 重启 VPA | MEDIUM |
| RC-004 | Cluster Autoscaler 权限/配置错误 | 中 | REM-004 修复 CA | MEDIUM |
| RC-005 | 资源配额或节点池限制 | 中 | REM-005 调整限制 | LOW |
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +19 lines bc6cda2cd2af
- 1mo ago First seen · 323 lines · 21 tokens per session scan A 7afa2a7549c4
k8s-autoscaling is a skill published in the GitHub repository kudig-io/kudig-database (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 21 tokens to every session and 4,335 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
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.
application-integration-troubleshooting
Diagnoses failed, stuck, or silent Google Cloud Application Integration runs and Integration Connectors tasks using the REST API, Cloud Logging, and Cloud Monitoring. Use when an integration fails, returns HTTP 200 without doing the expected work, hangs in a suspended or retry state, or hits IAM, run-as service…
gke-storage-troubleshooting
Diagnoses GKE persistent-storage failures — volume attach/mount errors (Regional PD on optimized VMs, fsGroup mount timeouts), disk-performance and node storage-pressure issues, slow-disk Pod-creation failures, volume-expansion problems, Local SSD / Hyperdisk Storage Pool creation errors, and Cloud Storage FUSE OOM.…
gke-workload-scaling-troubleshooting
Diagnoses GKE HorizontalPodAutoscaler (HPA) failures — metrics showing as , FailedGetResourceMetric / FailedGetScale / FailedComputeMetricsReplicas events, missing Pod resource requests, custom/external metrics-pipeline breakage (FailedGetExternalMetric / FailedGetCustomMetric, unavailable metrics adapter…
gke-ai-troubleshooting-tpu-mxla-hang
Diagnose GKE Cloud TPU multi-slice training hangs (Megascale HANGDETECTED logs and hang monitored events) using the ML Diagnostics Megascale XLA (MXLA) Hang Analyzer (gcloud alpha mldiagnostics monitored-events) and 1-minute Cloud Monitoring multi-slice latency metrics (kubernetes.io/container/multislice/).…
gke-ai-troubleshooting-tpu-performance-degradation
Diagnose GKE Cloud TPU training throughput drops and step-time regressions (15%+ TPU duty-cycle drop) using ML Diagnostics Workload Monitoring (gcloud alpha mldiagnostics monitored-events / hypercomputecluster.googleapis.com/v1alpha) and 1-minute Cloud Monitoring system metrics (kubernetes.io/node/accelerator/).…