重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
helm-debugging by laurigates/claude-plugins
npx skills add https://github.com/laurigates/claude-plugins --skill helm-debugging诊断和修复 Helm 部署失败、模板错误和配置问题的综合指南。
在以下情况自动使用此技能:
在所有 kubectl 和 helm 命令中始终明确指定 --context。切勿依赖当前上下文。
# 正确:显式指定上下文
kubectl --context=prod-cluster get pods -n prod
helm --kube-context=prod-cluster status myapp -n prod
# 错误:依赖当前上下文
kubectl get pods -n prod # 是哪个集群?
这可以防止在错误的集群上执行意外操作。
始终遵循此流程以实现稳健的部署:
# 1. LINT - 静态分析(仅限本地图表)
helm lint ./mychart --strict
# 2. TEMPLATE - 本地渲染模板
helm template myapp ./mychart \
--debug \
--values values.yaml
# 3. DRY-RUN - 服务端验证
helm install myapp ./mychart \
--namespace prod \
--values values.yaml \
--dry-run --debug
# 4. INSTALL - 实际部署
helm install myapp ./mychart \
--namespace prod \
--values values.yaml \
--atomic --wait
# 5. TEST - 部署后验证(如果图表包含测试)
helm test myapp --namespace prod --logs
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 本地渲染所有模板
helm template myapp ./mychart \
--debug \
--values values.yaml
# 渲染特定模板文件
helm template myapp ./mychart \
--show-only templates/deployment.yaml \
--values values.yaml
# 使用调试输出渲染(显示计算后的值)
helm template myapp ./mychart \
--debug \
--values values.yaml \
2>&1 | less
# 针对 Kubernetes API 进行验证(试运行)
helm install myapp ./mychart \
--namespace prod \
--values values.yaml \
--dry-run \
--debug
# 获取已部署的清单(集群中的实际 YAML)
helm get manifest myapp --namespace prod
# 获取已部署的值(实际使用的值)
helm get values myapp --namespace prod
# 获取所有值(包括默认值)
helm get values myapp --namespace prod --all
# 获取包含资源的发布状态
helm status myapp --namespace prod --show-resources
# 获取发布的所有信息
helm get all myapp --namespace prod
# 检查图表结构和模板
helm lint ./mychart
# 使用严格模式检查(将警告视为错误)
helm lint ./mychart --strict
# 使用特定值进行检查
helm lint ./mychart --values values.yaml --strict
# 针对 Kubernetes API 验证图表
helm install myapp ./mychart \
--dry-run --validate --namespace prod
# 启用 Helm 调试日志记录
helm install myapp ./mychart \
--namespace prod \
--debug \
--dry-run
# 启用 Kubernetes 客户端日志记录
helm install myapp ./mychart \
--namespace prod \
--v=6 # 详细级别 0-9
| 场景 | 症状 | 快速修复 |
|---|---|---|
| YAML 解析错误 | error converting YAML to JSON | 检查缩进,使用 {{- ... }} 去除空白 |
| 模板渲染错误 | nil pointer evaluating interface | 添加默认值:`{{ .Values.key |
| 值类型错误 | cannot unmarshal string into Go value of type int | 在模板中使用 `{{ .Values.port |
| 资源已存在 | resource that already exists | helm uninstall 冲突的发布或接管资源 |
| 镜像拉取失败 | ImagePullBackOff | 修复镜像名称/标签,创建拉取密钥 |
| CRD 未找到 | no matches for kind | 先安装 CRD:kubectl apply -f crds/ |
| 超时 | timed out waiting for the condition | 增加 --timeout,检查就绪探针 |
| 钩子失败 | pre-upgrade hooks failed | 删除失败的钩子作业,使用 --no-hooks 重试 |
有关每个故障场景的详细调试步骤、修复方法和示例,请参阅 REFERENCE.md。
| 上下文 | 命令 |
|---|---|
| 发布状态 (JSON) | helm status <release> -n <ns> -o json |
| 所有值 (JSON) | helm get values <release> -n <ns> --all -o json |
| Pod 状态 (紧凑) | kubectl get pods -n <ns> -l app.kubernetes.io/instance=<release> -o wide |
| 事件 (已排序) | kubectl get events -n <ns> --sort-by='.lastTimestamp' -o json |
| 渲染 + 验证 | `helm template <release> ./chart --debug 2>&1 |
每周安装次数
65
代码仓库
GitHub 星标数
23
首次出现
2026年1月29日
安全审计
安装于
opencode63
github-copilot63
codex62
kimi-cli61
amp61
cline61
Comprehensive guidance for diagnosing and fixing Helm deployment failures, template errors, and configuration issues.
Use this skill automatically when:
Always specify--context explicitly in all kubectl and helm commands. Never rely on the current context.
# CORRECT: Explicit context
kubectl --context=prod-cluster get pods -n prod
helm --kube-context=prod-cluster status myapp -n prod
# WRONG: Relying on current context
kubectl get pods -n prod # Which cluster?
This prevents accidental operations on the wrong cluster.
ALWAYS follow this progression for robust deployments:
# 1. LINT - Static analysis (local charts only)
helm lint ./mychart --strict
# 2. TEMPLATE - Render templates locally
helm template myapp ./mychart \
--debug \
--values values.yaml
# 3. DRY-RUN - Server-side validation
helm install myapp ./mychart \
--namespace prod \
--values values.yaml \
--dry-run --debug
# 4. INSTALL - Actual deployment
helm install myapp ./mychart \
--namespace prod \
--values values.yaml \
--atomic --wait
# 5. TEST - Post-deployment validation (if chart has tests)
helm test myapp --namespace prod --logs
# Render all templates locally
helm template myapp ./mychart \
--debug \
--values values.yaml
# Render specific template file
helm template myapp ./mychart \
--show-only templates/deployment.yaml \
--values values.yaml
# Render with debug output (shows computed values)
helm template myapp ./mychart \
--debug \
--values values.yaml \
2>&1 | less
# Validate against Kubernetes API (dry-run)
helm install myapp ./mychart \
--namespace prod \
--values values.yaml \
--dry-run \
--debug
# Get deployed manifest (actual YAML in cluster)
helm get manifest myapp --namespace prod
# Get deployed values (what was actually used)
helm get values myapp --namespace prod
# Get ALL values (including defaults)
helm get values myapp --namespace prod --all
# Get release status with resources
helm status myapp --namespace prod --show-resources
# Get everything about a release
helm get all myapp --namespace prod
# Lint chart structure and templates
helm lint ./mychart
# Lint with strict mode (treats warnings as errors)
helm lint ./mychart --strict
# Lint with specific values
helm lint ./mychart --values values.yaml --strict
# Validate chart against Kubernetes API
helm install myapp ./mychart \
--dry-run --validate --namespace prod
# Enable Helm debug logging
helm install myapp ./mychart \
--namespace prod \
--debug \
--dry-run
# Enable Kubernetes client logging
helm install myapp ./mychart \
--namespace prod \
--v=6 # Verbosity level 0-9
| Scenario | Symptom | Quick Fix |
|---|---|---|
| YAML parse error | error converting YAML to JSON | Check indentation, use {{- ... }} for whitespace chomping |
| Template rendering error | nil pointer evaluating interface | Add defaults: `{{ .Values.key |
| Value type error | cannot unmarshal string into Go value of type int | Use `{{ .Values.port |
| Resource already exists | resource that already exists | conflicting release or adopt resource |
For detailed debugging steps, fixes, and examples for each failure scenario, see REFERENCE.md.
| Context | Command |
|---|---|
| Release status (JSON) | helm status <release> -n <ns> -o json |
| All values (JSON) | helm get values <release> -n <ns> --all -o json |
| Pod status (compact) | kubectl get pods -n <ns> -l app.kubernetes.io/instance=<release> -o wide |
| Events (sorted) | kubectl get events -n <ns> --sort-by='.lastTimestamp' -o json |
| Render + validate | `helm template <release> ./chart --debug 2>&1 |
Weekly Installs
65
Repository
GitHub Stars
23
First Seen
Jan 29, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode63
github-copilot63
codex62
kimi-cli61
amp61
cline61
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
111,700 周安装
YouTube搜索技能 - 5种方法实现智能视频数据检索与字幕提取
5 周安装
Visual Planner:基于tldraw的可视化工作流与智能体编排图表工具
6 周安装
create-mcp-app 快速构建交互式 MCP 应用 - 工具与资源整合指南
7 周安装
Nuxt Studio 设置与部署指南:为Nuxt Content网站添加可视化CMS编辑器
13 周安装
自主开发代理交付工单技能:AI自动化代码任务处理与PR交付
8 周安装
JSON 转 React Email 渲染器:用 JSON 规范生成 HTML/纯文本邮件 | @json-render/react-email
8 周安装
helm uninstall| Image pull failure | ImagePullBackOff | Fix image name/tag, create pull secret |
| CRD not found | no matches for kind | Install CRDs first: kubectl apply -f crds/ |
| Timeout | timed out waiting for the condition | Increase --timeout, check readiness probes |
| Hook failure | pre-upgrade hooks failed | Delete failed hook job, retry with --no-hooks |