k8s-debug
Structured Kubernetes debugging for GPU workloads. Triggered by "pod crash", "CrashLoopBackOff", "OOMKilled", "GPU scheduling", or /k8s-debug
- License 许可
- MIT
- 最近更新
- 2026-10-13
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- k8s-debug
- tools
- [ "Read", "Bash", "Grep" ]
- description
- Structured Kubernetes debugging for GPU workloads. Triggered by "pod crash", "CrashLoopBackOff", "OOMKilled", "GPU scheduling", or /k8s-debug
- user-invocable
- true
- disable-model-invocation
- true
02 资源文件 2
- 参考文档README.md2.8 KB
- 参考文档references/gpu-scheduling-checklist.md1.2 KB
03 SKILL.md 正文
K8s Debug — GPU Workload Triage
Structured debugging workflow. Do NOT skip steps.
Triage Order
1. Pod Status
kubectl get pod <name> -n <ns> -o wide
kubectl describe pod <name> -n <ns>
Check: phase, conditions, restart count, node, QoS class.
2. Events (BEFORE logs)
kubectl get events -n <ns> --sort-by=.lastTimestamp --field-selector involvedObject.name=<name>
Events explain why logs may be empty.
3. Container Logs
kubectl logs <name> -n <ns> --previous
kubectl logs <name> -n <ns> -c <init-container>
4. Node Conditions
kubectl describe node <node>
kubectl get node <node> -o jsonpath='{.status.allocatable}'
5. Resource Requests vs Allocatable
kubectl describe node <node> | grep -A 20 "Allocated resources"
6. GPU Checks
See references/gpu-scheduling-checklist.md for full checklist.
kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.allocatable.nvidia\.com/gpu}{"\n"}{end}'
kubectl get pods -n kube-system -l app=nvidia-device-plugin
7. DRA Checks
kubectl get resourceclaims -n <ns>
kubectl describe resourceclaim <name> -n <ns>
Common Patterns
| Symptom | Cause | Fix |
|---|---|---|
| CrashLoopBackOff + CUDA error | CUDA mismatch | Match runtime to driver |
| Pending + insufficient GPU | No capacity | Check allocatable |
| OOMKilled | GPU mem exceeded | Reduce batch size |
| Device plugin not ready | Plugin crashed | Check DaemonSet |
Gotchas
- Check events before logs
- Verify node allocatable before assuming GPU issue
- CUDA errors often = driver/runtime mismatch, not code bugs
04 同仓库更多 Skills
update-cursor-settings
Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
update-cli-config
View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.
statusline
Configure a custom status line in the CLI. Use when the user mentions status line, statusline, statusLine, CLI status bar, prompt footer customization, or wants to add session context above the prompt.
split-to-prs
Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.
shell
Runs the rest of a /shell request as a literal shell command. Use only when the user explicitly invokes /shell and wants the following text executed directly in the terminal.
sdk
Guide users building apps, scripts, CI pipelines, or automations on top of the Cursor SDK - TypeScript (`@cursor/sdk`) or Python (`cursor-sdk` / `cursor_sdk`). Use when the user mentions integrating, installing, or writing code against the Cursor SDK; says `Agent.create`, `Agent.prompt`, `Agent.resume`, `agent.send`, `run.stream`, `run.messages`, `CursorAgentError`, `@cursor/sdk`, `cursor-sdk`, or `cursor_sdk`; asks to run Cursor agents programmatically from a script, CI/CD pipeline, GitHub Action, backend service, or other code outside the Cursor IDE; wants to pick between local and cloud runtime, configure MCP servers for an SDK agent, or handle streaming, cancellation, or errors; or is wiring Cursor into an automation, bot, or REST `/v1/agents` migration. Use eagerly rather than answering from memory; the SDK surface evolves and this skill is the source of truth for the external packages.