A comprehensive debugging container image for Kubernetes troubleshooting, packed with essential networking and debugging tools.
curl,wget- HTTP clientsnslookup,dig,host- DNS lookup toolsping,traceroute,mtr- Network connectivity testingnetcat(nc) - TCP/UDP connectionssocat- Advanced data relaytcpdump- Network packet analyzernmap- Network scanneriperf3- Network performance testing
httpie- User-friendly HTTP clientgrpcurl- gRPC client
psql- PostgreSQL clientmysql- MySQL/MariaDB clientredis-cli- Redis client
bash,vim,nano- Shell and text editorsjq,yq- JSON/YAML processorsgit- Version controlhtop- Process viewerstrace- System call traceropenssl- TLS/SSL toolkit
kubectl run debug-pod --image=ghcr.io/YOUR_USERNAME/k8s-debug:latest --restart=Never -- sleep infinitykubectl exec -it debug-pod -- /bin/bashapiVersion: v1
kind: Pod
metadata:
name: debug-pod
spec:
containers:
- name: debug
image: ghcr.io/YOUR_USERNAME/k8s-debug:latest
command: ["/bin/bash", "-c", "sleep infinity"]# DNS lookup
nslookup service-name.namespace.svc.cluster.local
# Test HTTP endpoint
curl -v http://service-name:port/health
# Check connectivity
nc -zv service-name port
# Network trace
tcpdump -i any -n host service-ip
# Test database connection
psql -h postgres-service -U username -d databaseThis image is automatically built and published to GitHub Container Registry (GHCR) using GitHub Actions.
The image is automatically built and pushed when:
- Push to main/master: Creates
latesttag - Version tags: Push a tag like
v1.0.0to create version-specific tags - Manual trigger: Use "Run workflow" in GitHub Actions tab
-
Fork or create this repository on GitHub
-
Enable GitHub Actions
- Go to your repository settings
- Navigate to Actions → General
- Ensure "Allow all actions and reusable workflows" is enabled
-
Make package public (optional)
- After first build, go to your GitHub profile → Packages
- Click on the
k8s-debugpackage - Go to Package settings → Change visibility → Public
-
Trigger a build
# Method 1: Push to main branch git push origin main # Method 2: Create a version tag git tag v1.0.0 git push origin v1.0.0 # Method 3: Use GitHub UI # Go to Actions tab → Build and Push to GHCR → Run workflow
docker build -t ghcr.io/YOUR_USERNAME/dpod:latest .
docker push ghcr.io/YOUR_USERNAME/dpod:latest