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-certificate-expirygit 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-certificate-expiry)<a href="https://agentmods.dev/skills/kudig-io/kudig-database/k8s-certificate-expiry"><img src="https://agentmods.dev/badge/skills/kudig-io/kudig-database/k8s-certificate-expiry/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-certificate-expiry"><img src="https://agentmods.dev/badge/skills/kudig-io/kudig-database/k8s-certificate-expiry.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.00000 | $0.03907 |
| Opus 5.5 | $0.00000 | $0.01563 |
| Sonnet 5.5 | $0.00000 | $0.00781 |
| Haiku 4.5 | $0.00000 | $0.00391 |
Grade C, and why
k8s-certificate-expiry scanned grade C with 1 finding 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.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
- **手动renew后kubeconfig失效** → 更新~/.kube/config中的证书数据 How it starts
The opening of the file, as written. The whole thing — 318 lines — stays where its author put it; the contents beside it link to each section on GitHub.
生产环境安全提示
本文档包含可直接执行的运维命令。执行前请确认:当前目标集群与 Namespace 是否正确;是否具备足够的 RBAC 权限;是否已在非生产环境验证。命令风险等级标注:🔴 高风险(可能造成数据丢失或服务中断)、🟡 中风险(会修改集群状态,但通常可回滚)、🟢 低风险/只读(信息收集,无副作用)。
证书过期问题诊断与修复
概述
[[kubernetes|Kubernetes]] 证书体系包含 API Server、[[etcd|etcd]]、[[kubelet|kubelet]]、frontend-proxy 等多组证书。证书过期会导致组件间通信失败、节点 NotReady 等严重后果。
注意: 本 Skill 涉及高风险的证书操作,默认执行模式为 L1-advisory(仅建议)。
症状识别
| # | 症状描述 | 检测方法 | 置信度 |
|---|---|---|---|
| S1 | x509 证书过期错误 | 日志中出现 certificate has expired |
0.95 |
| S2 | 节点突然 NotReady | kubectl get nodes |
0.80 |
| S3 | API Server 连接失败 | kubectl 命令报错 |
0.90 |
快速诊断
./scripts/diagnose-quick.sh
修复动作
低风险操作(只读/检查)
| # | 动作 | 命令 |
|---|---|---|
| R1 | 检查所有证书过期时间 | kubeadm certs check-expiration |
| R2 | 查看 kubelet 证书状态 | openssl x509 -in /var/lib/kubelet/pki/kubelet-client-current.pem -noout -dates |
高风险修复(人工执行)
| # | 修复动作 | 风险 |
|---|---|---|
| R3 | 使用 kubeadm 续期证书 | 需重启控制平面组件,可能导致短暂不可用 |
| R4 | 手动轮换 CA 证书 | 集群级操作,所有组件需重新签发证书 |
| R5 | 批准 kubelet CSR | 影响节点证书自动轮换 |
危险操作
- 动作:
kubeadm certs renew all && reboot- 风险: 控制平面重启期间集群不可用
- 确认要求: 是,需维护窗口
- 动作: 删除
/etc/kubernetes/pki目录- 风险: 导致集群完全不可恢复
- 确认要求: 是
验证修复
./scripts/verify-cert.sh
升级条件
- 证书续期后节点仍 NotReady → 升级至 SKILL-NODE-001
- CA 证书过期 → 升级至专家级事件响应
远程顾问信息收集
作为远程顾问,我无法直接连接你的集群。请帮我收集以下信息,我会根据你提供的内容给出准确的诊断建议。
第一步:快速确认(30 秒内回答)
- 影响范围:这个问题影响多少个节点 / Pod / 命名空间?
- 紧急程度:业务是否已中断?是否有用户投诉?
- 发生时间:问题是突然发生还是逐渐恶化?最近是否有变更?
第二步:关键信息(请提供你能获取的)
- kubectl 版本:
kubectl version --short的输出 - K8s 集群版本:
kubectl get nodes -o wide中的 VERSION 列 - 节点状态:控制平面节点是否正常?工作节点是否正常?
第三步:诊断信息(按需补充)
如果以下命令你无法执行,请直接告诉我「无法执行」,我会提供替代方案。
- 相关组件日志:
kubectl logs -n <namespace> <pod>的最后 30 行 - 节点资源:
kubectl top nodes或kubectl describe node <node>的 Capacity/Allocated resources - 近期变更:最近 24 小时是否有部署、扩缩容、配置变更?
如果信息不足
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 505d4fbf6175
- 1mo ago First seen · 299 lines · 0 tokens per session scan C a08bec57975e
k8s-certificate-expiry is a skill published in the GitHub repository kudig-io/kudig-database (6 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,907 tokens. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
cluster-events
Analyze cluster-wide Kubernetes events to identify issues and patterns. Aggregates Warning events, detects high-frequency patterns, and correlates related events.
networkpolicy-debug
Diagnose NetworkPolicy-related connectivity issues (traffic unexpectedly blocked, default-deny effects, egress blocking DNS). Identifies which NetworkPolicies affect a pod, checks ingress/egress rules, and verifies CNI support.
node-logs
Retrieve logs from a Kubernetes node — systemd units (journalctl) or files under /var/log. Use when you need node-level evidence: containerd, kubelet, kernel/OOM, or anything the pod's own log cannot show. Three access paths in order: hostscript (SSH), nodescript (debug pod), and localscript against the kubelet log…
statefulset-debug
Diagnose StatefulSet rollout and scaling failures (ordered update stuck, OnDelete not updating, partition misconfiguration, PVC binding deadlocks). Checks update strategy, pod ordinal progression, PVC bindings, and ordered startup to identify why a StatefulSet is not progressing.
volcano-gang-scheduling
Gang Scheduling diagnostic guide for Volcano. Use when PodGroup cannot schedule completely, member Pods remain Pending, or minAvailable/minMember constraints are not satisfied.
http-log-stats
Count HTTP status codes and request-duration distribution from an ingress controller's access log, over a fixed time window, in one pass. Use when asked "how many 503s", "how many requests took over 60s", "what's the status code / latency distribution" for a service — i.e. a MEASUREMENT question about traffic, not a…