Skip to content
Agentmart
Submit a tool

k8s-debug

Launch ephemeral debug container in running pod for interactive debugging.

Skill by eveld

IndexedMIT★ 10
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/eveld-k8s-debug

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Launch ephemeral debug container in running pod for interactive debugging. Use when you need to debug a pod without restarting it.

Use cases: devops

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/k8s-debug

What's inside

Skill name
k8s-debug
Description
Launch ephemeral debug container in running pod for interactive debugging. Use when you need to debug a pod without restarting it.
License
MIT
Instructions
157 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Debug Kubernetes Container

Launch an ephemeral debug container attached to a running pod for interactive debugging.

## When to Use

- Pod is failing but you need to inspect it live
- Need debugging tools (curl, netstat, tcpdump) not available in production container
- Want to debug without modifying production container image
- Investigating network, process, or filesystem issues in running pod

## Pre-flight Checks

### Authentication and Context
```bash
# Check kubectl context
kubectl config current-context || {
  echo "No kubectl context. Run: kubectl config use-context <context>"
  exit 1
}

# Show current context
echo "K8s Context: $(kubectl config current-context)"
```

## Workflow

### 1. Launch Debug Container

**Basic debug container**:
```bash
# Attach ephemeral debug container to running pod
kubectl debug -it <pod-name> \
  --image=nicolaka/netshoot \
  --namespace=<namespace>
```

**With specific container target** (for multi-container pods):
```bash
# Target specific container in pod
kubectl debug -it <pod-name> \
  --image=nicolaka/netshoot \
  --target=<container-name> \
  --namespace=<namespace>
```

**With custom image**:
```bash
# Use custom debug image
kubectl debug -it <pod-name> \
  --image=ubuntu:latest \
  --namespace=<namespace>
```

### 2. Common Debug Commands Inside Container

Once inside the debug container, use these commands:

**Network debugging**:
```bash
# Test HTTP endpoints
curl http://localhost:8080/health
curl -v http://database-service:5432

# Check listening ports
netstat -tulpn

# Capture network traffic
tcpdump -i any port 8080

# DNS resolution
nslookup database-service
dig +short database-service.default.svc.cluster.local
```

**Process inspection**:
```bash
# List processes
ps aux

# Monitor processes
top

# Check process details
ps aux | grep api-gateway
```

**File system inspection**:
```bash
# Check application directory
ls -la /app

# View config files
cat /app/config.yaml

# Check environment variables
env | grep API

# Check mounted volumes
df -h
mount | grep /app
```

**Container metadata**:
```bash
# Check container env
printenv

# View pod labels (if tools available)
cat /etc/podinfo/labels
```

### 3. Document and Exit

After debugging:
1. Document findings in investigation notes or Linear ticket
2. Exit debug container: `exit` or Ctrl+D
3. Debug container is automatically removed

From eveld/claude, MIT.

More from eveld/claude

Signals

Stars
10
Forks
2
Open issues
0
Last commit (this folder)
Dec 24, 2025 (10 months ago)
Last release
Dec 29, 2025 (10 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from eveld

Cite this page

k8s-debug skill. Agent Mart. https://agentmart.dev/skills/eveld-k8s-debug (last updated 2026-10-24)