k8s-config-secret

k8s-config-secret is a skill for Claude Code, Codex from kudig-io/kudig-database. It costs 25 tokens per session (4,051 once invoked), scanned A, original, Apache-2.0.

A Kubernetes troubleshooting workflow for ConfigMaps and Secrets, which store configuration values and sensitive settings for applications.

In plain words
What is it for?
It is for diagnosing, fixing, and verifying Kubernetes ConfigMap and Secret mounting or configuration problems.
Why use it?
It helps investigate cases where these values fail to mount or changes do not take effect.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit It is for diagnosing, fixing, and verifying Kubernetes ConfigMap and Secret mounting or configuration problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kudig-io/kudig-database/k8s-config-secret
Install

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.

Any agent
npx skills add kudig-io/kudig-database --skill k8s-config-secret
Clone the repo
git clone --depth 1 https://github.com/kudig-io/kudig-database

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for k8s-config-secret

README.md
[![agentmods](https://agentmods.dev/badge/skills/kudig-io/kudig-database/k8s-config-secret/github.svg)](https://agentmods.dev/skills/kudig-io/kudig-database/k8s-config-secret)
Your own site
<a href="https://agentmods.dev/skills/kudig-io/kudig-database/k8s-config-secret"><img src="https://agentmods.dev/badge/skills/kudig-io/kudig-database/k8s-config-secret/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.

agentmods 80×15 button for k8s-config-secret

Your own site · 80×15
<a href="https://agentmods.dev/skills/kudig-io/kudig-database/k8s-config-secret"><img src="https://agentmods.dev/badge/skills/kudig-io/kudig-database/k8s-config-secret.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,051 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00025 $0.04051
Opus 5.5 $0.00010 $0.01620
Sonnet 5.5 $0.00005 $0.00810
Haiku 4.5 $0.00003 $0.00405

Measured 1mo ago against content hash d04ee463acc0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

k8s-config-secret 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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/diagnose-quick.sh, scripts/verify-config.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

19-故障诊断/08-技能体系/skill-set/k8s-config-secret/SKILL.md · 327 lines

How it starts

The opening of the file, as written. The whole thing — 327 lines — stays where its author put it; the contents beside it link to each section on GitHub.

生产环境安全提示

本文档包含可直接执行的运维命令。执行前请确认:当前目标集群与 Namespace 是否正确;是否具备足够的 RBAC 权限;是否已在非生产环境验证。命令风险等级标注:🔴 高风险(可能造成数据丢失或服务中断)、🟡 中风险(会修改集群状态,但通常可回滚)、🟢 低风险/只读(信息收集,无副作用)。

K8s ConfigMap & Secret Failure 诊断与修复

ConfigMap 和 Secret 是 [[kubernetes|Kubernetes]] 中管理应用配置和敏感数据的核心机制。挂载失败、键名错误、大小超限、不可变配置修改等问题都会导致应用无法正确读取配置。

本 [[SKILL|Skill]] 覆盖 ConfigMap/Secret 挂载失败、配置热更新不生效、敏感数据编码错误等全部常见根因的诊断和修复。

何时使用此 Skill

症状 检测方法 置信度
Pod 状态为 CreateContainerConfigError `kubectl get [[Pods pods]]`
应用日志显示配置缺失 应用日志 0.90
ConfigMap key 不存在 kubectl describe configmap 0.95
Secret 数据 base64 错误 kubectl get secret -o yaml 0.90
配置更新后应用未重载 对比 ConfigMap 和容器内文件 0.85

排除条件: Pod 崩溃 → SKILL-POD-001; 权限问题 → SKILL-RBAC-001

快速分级(2 分钟内完成)

影响范围
├── 核心服务配置错误无法启动 ────→ P0(15min 内修复)
├── 生产环境配置未更新 ──────────→ P1(30min 内修复)
├── Secret 泄露或过期 ───────────→ P0(15min 内修复)
└── 测试环境配置问题 ────────────→ P3(4h 内处理)

立即升级条件:

  • Secret 内容意外暴露(如误提交到 Git)
  • 核心服务因配置错误完全无法启动
  • TLS Secret 过期导致服务中断

执行流程

# 🟢 低风险:只读/信息收集,通常无副作用
工单/告警触发
    │
    ▼
┌──────────────┐    脚本: scripts/diagnose-quick.sh
│ Phase 1      │    内容: kubectl 快速检查(只读)
│ 快速检查      │    Step: D1.1-D1.5
└──────┬───────┘
       │ 确认根因
       ▼
┌──────────────┐    参考: reference/remediation-playbook.md
│ 修复操作      │    风险: LOW → MEDIUM → HIGH
│ REM-001~005  │
└──────┬───────┘
       │
       ▼
┌──────────────┐    脚本: scripts/verify-config.sh
│ 验证确认      │    检查: 配置挂载和内容
└──────────────┘

可用脚本

脚本 用途 参数 风险
scripts/diagnose-quick.sh ConfigMap/Secret 快速诊断 NAMESPACE POD_NAME 只读
scripts/verify-config.sh 修复后验证 NAMESPACE POD_NAME 只读

根因概览 (5 种)

RC ID 根因 概率 首选修复 风险
RC-001 ConfigMap/Secret key 名错误 高 REM-001 修正 key LOW
RC-002 Secret 数据未 base64 编码 高 REM-002 重新编码 LOW
RC-003 ConfigMap/Secret 大小超限 中 REM-003 拆分配置 LOW
RC-004 immutable ConfigMap/Secret 被修改 中 REM-004 重新创建 MEDIUM
RC-005 挂载路径或 subPath 错误 中 REM-005 修正挂载 LOW

Read the full file on GitHub · 327 lines

Files

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.

Changes

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.

  1. 1mo ago Changed · +19 lines d04ee463acc0
  2. 1mo ago First seen · 308 lines · 25 tokens per session scan A 1c9849abfc39

Subscribe to this mod's changes

k8s-config-secret is a skill published in the GitHub repository kudig-io/kudig-database (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 25 tokens to every session and 4,051 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.