https://github.com/nmaguiar/netutils
Alpine & Debian based images with tools for network connectivity debugging among other troubleshooting utilities.
https://github.com/nmaguiar/netutils
containers debug kubernetes network
Last synced: 5 months ago
JSON representation
Alpine & Debian based images with tools for network connectivity debugging among other troubleshooting utilities.
- Host: GitHub
- URL: https://github.com/nmaguiar/netutils
- Owner: nmaguiar
- License: apache-2.0
- Created: 2024-07-22T02:33:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-12T07:21:47.000Z (5 months ago)
- Last Synced: 2026-01-12T17:32:56.896Z (5 months ago)
- Topics: containers, debug, kubernetes, network
- Language: Shell
- Homepage:
- Size: 25 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# NetUtils
Image ("nmaguiar/netutils") with tools for network connectivity debugging (with the right permissions) among other troubleshooting utilities. The image is provided in two versions: Debian-based (nmaguiar/netutils:based) and Alpine-based (nmaguiar/netutils:lite). This is because some tools might not be available in the Alpine version.
Some of the included tools:
- mitmproxy
- termshark
- openaf
- iotop
- iperf
- tcpdump
- nmap
- iftop
- drill
- socat
- websocat
- posting
- strace
## Image security scans
[](.github/sec-build.md)
[](.github/sec-build-lite.md)
[](.github/sec-lite.md)
[](.github/sec-latest.md)
## Usage
### 🐳 Deploy using docker
```bash
docker run --rm -ti nmaguiar/netutils /bin/bash
```
Host network:
```bash
docker run --rm -ti --net host -v /var/run/docker.sock:/var/run/docker.sock nmaguiar/netutils /bin/bash
```
Container network:
```bash
CONTAINER=some_other_container && docker run --rm -ti --net container:$CONTAINER --pid container:$CONTAINER -v /var/run/docker.sock:/var/run/docker.sock --volumes-from=$CONTAINER nmaguiar/netutils /bin/bash
```
With permissions for termshark:
```bash
CONTAINER=some_other_container && docker run --rm -ti --cap-add=NET_ADMIN --cap-add=NET_RAW -v /var/run/docker.sock:/var/run/docker.sock --volumes-from=$CONTAINER --net container:$CONTAINER --pid container:$CONTAINER nmaguiar/netutils /bin/bash
```
### ⚙️ Deploy using kubectl
```bash
kubectl run netutils --rm -it --image nmaguiar/netutils -- /bin/bash
```
Attach to a container to debug:
```bash
kubectl debug pod-to-debug -it --image nmaguiar/netutils --target=container-to-debug --profile='netadmin' -- /bin/bash
```
Start in a specific node:
```bash
NODENAME=node-server-0 NAME=netutils NS=kube-system /bin/sh -c 'kubectl run -n $NS $NAME --rm -ti --image=nmaguiar/netutils --overrides="{\"apiVersion\":\"v1\",\"spec\":{\"nodeName\":\"$NODENAME\",\"containers\":[{\"name\":\"$NAME\",\"image\":\"nmaguiar/netutils\",\"stdin\":true,\"stdinOnce\":true,\"tty\":true,\"args\":[\"/bin/bash\"]}]}}" -- /bin/bash'
```
Host network:
```bash
NODENAME=node-server-0 NAME=netutils NS=kube-system /bin/sh -c 'kubectl run -n $NS $NAME --rm -ti --image=nmaguiar/netutils --overrides="{\"apiVersion\":\"v1\",\"spec\":{\"hostNetwork\":true,\"nodeName\":\"$NODENAME\",\"containers\":[{\"name\":\"$NAME\",\"image\":\"nmaguiar/netutils\",\"stdin\":true,\"stdinOnce\":true,\"tty\":true,\"args\":[\"/bin/bash\"]}]}}" -- /bin/bash'
```