Container image packed with network troubleshooting tools for debugging Kubernetes clusters and Docker environments.
# Run interactively
docker run -it --rm ghcr.io/self-hosters-by-night/netkit:latest
# Run with host networking for advanced troubleshooting
docker run -it --rm --net=host --privileged ghcr.io/self-hosters-by-night/netkit:latestkubectl run netkit -it --rm --restart=Never --image=ghcr.io/self-hosters-by-night/netkit:latest --namespace=defaultkubectl apply -f k8s/pod.yamlkubectl exec -it netkit -- bashgit clone https://github.com/self-hosters-by-night/netkit.git
cd netkit
docker build -t ghcr.io/self-hosters-by-night/netkit:latest .- bmon - Bandwidth monitor with real-time interface statistics
- iftop - Real-time network bandwidth usage per connection
- iotop - Monitor I/O usage by processes
- mtr-tiny - Network diagnostic tool combining ping and traceroute
- ngrep - Network packet analyzer with grep-like pattern matching
- tcpdump - Packet capture and analysis tool
- tshark - Command-line network protocol analyzer (Wireshark CLI)
- bridge-utils - Ethernet bridge administration tools
- curl - Transfer data from/to servers (HTTP, FTP, etc.)
- dnsutils - DNS lookup utilities (dig, nslookup, host)
- ethtool - Display/change ethernet device settings
- httpie - Modern HTTP client with intuitive syntax
- iproute2 - Advanced IP routing utilities (ip, ss commands)
- net-tools - Basic networking tools (ifconfig, netstat, route)
- iperf3 - Network bandwidth measurement tool
- wrk - HTTP benchmarking tool
- netcat-openbsd - Network connection utility for reading/writing data
- socat - Multipurpose relay tool for bidirectional data transfer
- netstress - Network stress testing tool
- ipcalc-ng - IP address calculator and subnet planner
- iputils-arping - Send ARP requests to network hosts
- iputils-ping - Send ICMP echo requests (ping)
- iputils-tracepath - Trace network path to destination
- nmap - Network discovery and security auditing tool
- traceroute - Trace network route to destination
- tcptraceroute - Traceroute using TCP packets
- openssh-client - SSH client for secure remote connections
- telnet - Basic network protocol client
- whois - Query domain registration information
- mosquitto-clients - MQTT client tools (mosquitto_pub, mosquitto_sub)
- htop - Interactive process viewer
- lsof - List open files and network connections
- sysstat - System performance monitoring tools
- ldap-utils - LDAP client utilities for directory operations
- aria2 - Multi-protocol download utility
- wget - Non-interactive network downloader
- unzip/zip - Archive compression/decompression tools
- nfs-common - NFS client utilities
- jq - Command-line JSON processor
- yq - Command-line YAML processor
- less - Text file pager
- nano/vim - Text editors
- tree - Display directory structure in tree format
- screen - Terminal multiplexer for persistent sessions
- tmux - Advanced terminal multiplexer
- kubectl - Kubernetes command-line tool
- location - IP geolocation lookup tool
- Non-root user
netkitwith sudo access to privileged network tools - Minimal attack surface with slim Debian base
- Kubernetes pod runs with restricted security context
- Only essential network capabilities (NET_RAW, NET_ADMIN) when needed
# Test DNS resolution
dig google.com
nslookup kubernetes.default.svc.cluster.local
host _https._tcp.kubernetes.default.svc.cluster.local# Test connectivity
ping 8.8.8.8
traceroute google.com
mtr --report-cycles 10 8.8.8.8
# Port scanning
nmap -p 80,443 google.com# Network performance (requires iperf3 server)
iperf3 -c <server-ip>
# HTTP benchmarking
wrk -t12 -c400 -d30s http://example.com/# Capture packets
sudo tcpdump -i any -n host 8.8.8.8
# With tshark
sudo tshark -i any -n -f "host 8.8.8.8"
# Network grep
sudo ngrep -d any "GET" tcp port 80# Kubernetes service discovery
dig SRV _https._tcp.kubernetes.default.svc.cluster.local
# LDAP queries
ldapsearch -x -H ldap://ldap.example.com -b "dc=example,dc=com"# Subscribe to MQTT topic
mosquitto_sub -h mqtt.example.com -t "sensor/temperature"
# Publish MQTT message
mosquitto_pub -h mqtt.example.com -t "sensor/temperature" -m "23.5"Feel free to submit issues and pull requests to improve this toolset.