Nettools to debugs. A container image with common networking and debugging tools for troubleshooting Kubernetes clusters.
Network Tools
curl
,wget
: HTTP clientstcpdump
: Network packet analyzeriptables
,ip6tables
: Firewall managementiproute2
: Network configurationnftables
: Next-generation firewallmtr
, traceroute: Network route tracingsocat
: Multipurpose relayiperf3
: Network performance testingnetcat-openbsd
: TCP/UDP connectionsnmap
: Network scannerdrill
,bind-tools
: DNS tools
Debugging Tools
strace
: System call tracergrpcurl
: gRPC testing toolhtop
: Process monitorconntrack-tools
: Connection trackingethtool
: Network interface tool
Database Clients
postgresql-client
: Connection PostgreSQLmysql-client
: Connection Mysql
Utility Tools
jq
,yq
: JSON/YAML processorsvim
: Text editorsbash
: Shell
- Run as a Pod
kubectl run -it --image=ghcr.io/duyhenryer/nettools:2.0.2 nettools --restart=Never -n default
- Run as Docker container
docker run -it ghcr.io/duyhenryer/nettools:2.0.2 sh
- Pod Template
apiVersion: v1
kind: Pod
metadata:
name: nettools
namespace: default
spec:
containers:
- name: nettools
image: ghcr.io/duyhenryer/nettools:2.0.2
command: ["/bin/sleep", "infinity"]
imagePullPolicy: IfNotPresent
restartPolicy: Never
- Deployment Template
apiVersion: apps/v1
kind: Deployment
metadata:
name: nettools
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: nettools
template:
metadata:
labels:
app: nettools
spec:
containers:
- name: nettools
image: ghcr.io/duyhenryer/nettools:2.0.2
command: ["/bin/sleep", "infinity"]
imagePullPolicy: IfNotPresent
tcpdump
- Packet analyzer for network debugging.
tcpdump -i eth0 port 9999 -c 1 -Xvv
More info on tcpdump can be found here.
netstat
is a useful tool for checking your network configuration and activity.
# List all TCP/UDP ports
netstat -tulpn
# Show routing table
netstat -r
2.0.2: Current stable version
- Added
grpcurl
- Base image updated to Alpine 3.19.1
Issues and pull requests are welcome!