k8s-debug
Installation
SKILL.md
Quickly triage a Kubernetes resource by gathering status, events, logs, and description in one pass.
Process
Parse $ARGUMENTS:
- First arg: resource identifier (e.g.,
pod/my-app,deploy/nginx,svc/api, or justmy-appwhich defaults to pod) - Second arg (optional): namespace (default: use current context's namespace)
--context <ctx>: kubectl context to use--logs: include container logs (last 50 lines per container)--events: include namespace events filtered to this resource--all: equivalent to--logs --events(default behavior if no flags given)
If no flags are specified, default to --all (show everything).
Build the kubectl context flag: CTX="" or CTX="--context <ctx>" if specified.