Specialized debug container images for Kubernetes troubleshooting. Multi-arch support (amd64 + arm64).
# Minimal debug shell (~60MB)
kubectl run -it --rm debug --image tazhate/k8s-debug-container-minimal -- bash
# Network debugging
kubectl run -it --rm debug --image tazhate/k8s-debug-container-net -- bash
# Stress testing
kubectl run -it --rm debug --image tazhate/k8s-debug-container-stress -- bashInstall helper script for easier usage:
# Install
sudo curl -fsSL https://raw.githubusercontent.com/tazhate/k8s-debug-container/main/scripts/kubectl-debug \
-o /usr/local/bin/kubectl-debug && sudo chmod +x /usr/local/bin/kubectl-debug
# Usage
kubectl-debug # minimal (default)
kubectl-debug net # network tools
kubectl-debug stress # stress testing
kubectl-debug db -n prod # database tools in namespace| Image | Size | Use Case |
|---|---|---|
-minimal |
~60MB | Quick diagnostics |
-net |
~400MB | Network issues |
-db |
~350MB | Database connectivity |
-k8s |
~500MB | Cluster management |
-storage |
~300MB | Disk/IO problems |
-perf |
~350MB | Performance profiling |
-stress |
~250MB | Load testing |
-full |
~1.2GB | Everything |
curl, wget, dig, nslookup, jq, vim, tcpdump, mtr, netcat, openssl
tcpdump, nmap, netcat, iperf3, dig, traceroute, mtr, curl, wget,
httpie, socat, tshark, iftop, bmon, hping3, ngrep, whois
psql, mysql, redis-cli, mongosh, sqlite3
kubectl, helm, k9s, stern, kubectx, kubens, kustomize, yq, jq, bat, fzf
fio, iotop, hdparm, smartctl, ncdu, rclone, mc (MinIO), s3cmd, s5cmd
htop, iotop, strace, perf, bpfcc-tools, dstat, atop, nmon,
stress-ng, sysbench
stress-ng, sysbench, fio, iperf3, ioping, bonnie++, hey,
htop, dstat, sysstat
All tools from all images above.
kubectl run -it --rm debug --image tazhate/k8s-debug-container-net -- bash
# Inside container:
dig kubernetes.default.svc.cluster.local
nslookup my-service.namespace.svc.cluster.localkubectl run -it --rm debug --image tazhate/k8s-debug-container-net -- bash
# Inside container:
curl -v http://my-service:8080/health
tcpdump -i any port 8080
iperf3 -c target-pod -p 5201kubectl run -it --rm debug --image tazhate/k8s-debug-container-db -- bash
# Inside container:
psql -h postgres-service -U user -d mydb
mysql -h mysql-service -u user -p
redis-cli -h redis-service ping
mongosh mongodb://mongo-service:27017kubectl run -it --rm debug --image tazhate/k8s-debug-container-storage -- bash
# Inside container:
fio --name=randread --rw=randread --bs=4k --size=1G --runtime=60
ioping -c 10 /data
# S3 operations with s5cmd (fast parallel transfers)
s5cmd ls s3://my-bucket/
s5cmd cp 's3://my-bucket/data/*' /local/kubectl run -it --rm debug --image tazhate/k8s-debug-container-stress -- bash
# Inside container:
# CPU stress (4 workers for 60s)
stress-ng --cpu 4 --timeout 60s --metrics
# Memory stress (2GB for 30s)
stress-ng --vm 2 --vm-bytes 1G --timeout 30s
# Disk I/O stress
fio --name=stress --rw=randrw --bs=4k --size=512M --numjobs=4
# HTTP load test
hey -n 10000 -c 100 http://my-service:8080/kubectl run -it --rm debug --image tazhate/k8s-debug-container-perf -- bash
# Inside container:
htop
perf top
strace -p <PID>Attach debug container to running pod:
kubectl debug -it my-pod --image=tazhate/k8s-debug-container-net --target=my-container -- bash# Build single image
make build-minimal
make build-net
make build-stress
# Build all
make build-all
# Multi-arch build and push
make buildx-allMIT