https://github.com/polarsignals/bpftool-container
Fedora based container with bpftool installed for troubleshooting.
https://github.com/polarsignals/bpftool-container
Last synced: about 2 months ago
JSON representation
Fedora based container with bpftool installed for troubleshooting.
- Host: GitHub
- URL: https://github.com/polarsignals/bpftool-container
- Owner: polarsignals
- License: apache-2.0
- Created: 2023-07-05T08:24:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-05T08:41:52.000Z (over 1 year ago)
- Last Synced: 2025-01-03T04:39:42.779Z (about 2 months ago)
- Language: Makefile
- Size: 7.81 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bpftool container
It occasionally happens that we have to debug low level eBPF details. It's useful to have a container image ready with the tools we need.
For example this one-liner can be used to dump BPF logs from a node (replace the `nodeName`):
```
kubectl run --rm -it --privileged --image=fedora --overrides='{ "apiVersion": "v1", "spec": { "nodeName": "", "hostPID": true, "securityContext": { "privileged": true}, "containers": [{"name":"debug", "command": ["/bin/sh", "-c", "sudo bpftool prog tracelog"], "stdin": true, "stdinOnce": true, "tty": true, "securityContext": {"privileged": true}, "image": "ghcr.io/polarsignals/bpftool:latest","volumeMounts":[{"mountPath": "/sys/fs/bpf", "name":"bpffs"}]}], "volumes": [{"name": "bpffs","hostPath":{"path":"/sys/fs/bpf"}}] } }' debug
```