Quick Start
This section describes how to deploy bpfman
quickly from pre-built release
artifacts. Users can either deploy it locally via provided RPMs or in a
kubernetes cluster via the provided container images and install yamls. See Releases for the complete set of bpfman releases.
Deploy Released RPM from COPR Locally
This section describes how to install an RPM built automatically by the Packit Service. The Packit Service builds RPMs for each release.
To install an RPM generated by the Packit Service, the following packages need to be installed:
dnf
based OS:
Additionally the bpfman copr repo needs to be enabled:
To see information about the latest released version of bpfman simply run
sudo dnf info bpfman
Last metadata expiration check: 0:03:10 ago on Mon 06 May 2024 10:37:37 AM EDT.
Available Packages
Name : bpfman
Version : 0.4.2
Release : 1.fc39
Architecture : src
Size : 41 M
Source : None
Repository : copr:copr.fedorainfracloud.org:group_ebpf-sig:bpfman
Summary : An eBPF program manager
URL : https://bpfman.io
License : Apache-2.0
Description : An eBPF Program Manager.
Name : bpfman
Version : 0.4.2
Release : 1.fc39
Architecture : x86_64
Size : 9.7 M
Source : bpfman-0.4.2-1.fc39.src.rpm
Repository : copr:copr.fedorainfracloud.org:group_ebpf-sig:bpfman
Summary : An eBPF program manager
URL : https://bpfman.io
License : Apache-2.0 AND Unicode-DFS-2016 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
Description : An eBPF Program Manager.
Next install, either the latest version with:
Or install an older version with:
bpfman
is now installed but not running. To start the bpfman-rpc
server process:
Finally you can load and attach one of the sample applications:
sudo bpfman load image --image-url quay.io/bpfman-bytecode/tracepoint:latest --application my_tracepoint \
--programs tracepoint:enter_openat
Bpfman State
---------------
Name: enter_openat
Program Type: tracepoint
Image URL: quay.io/bpfman-bytecode/tracepoint:latest
Pull Policy: IfNotPresent
Global: None
Metadata: bpfman_application=my_tracepoint
Map Pin Path: /run/bpfman/fs/maps/63433
Map Owner ID: None
Maps Used By: 63433
Links: None
Kernel State
----------------------------------
Program ID: 63433
BPF Function: enter_openat
Kernel Type: tracepoint
Loaded At: 2025-03-12T13:02:29-0400
Tag: 9b2c38d37350bfff
GPL Compatible: true
Map IDs: [20081]
BTF ID: 30286
Size Translated (bytes): 96
JITted: true
Size JITted: 72
Kernel Allocated Memory (bytes): 4096
Verified Instruction Count: 9
sudo bpfman attach 63433 tracepoint --tracepoint syscalls/sys_enter_openat
Bpfman State
---------------
BPF Function: enter_openat
Program Type: tracepoint
Program ID: 63433
Link ID: 456579923
Tracepoint: syscalls/sys_enter_openat
Metadata: bpfman_application=my_tracepoint
sudo bpfman list programs
Program ID Application Type Function Name Links
63433 my_tracepoint tracepoint enter_openat (1) 456579923
When ready to uninstall, determine the RPM that is currently loaded:
To stop bpfman and uninstall the RPM:
sudo systemctl stop bpfman.socket
sudo systemctl disable bpfman.socket
sudo dnf erase -y bpfman-0.4.2-1.fc39.x86_64
sudo systemctl daemon-reload
Deploy Released Container Images on Kubernetes
The quickest solution for running bpfman
in a Kubernetes deployment is to run a
local Kubernetes KIND Cluster:
Note
OpenShift has tighter security requirements and requires additional
settings. When deploying bpfman on OpenShift, use the OperatorHub
from the
OpenShift console, search for ebpf
, and install either the Bpfman
Operator by Community
or the eBPF Manager Operator by Red Hat
. The
Bpfman Operator by Community
tracks the upstream releases of bpfman. The
eBPF Manager Operator by Red Hat
is based on bpfman at the time of the
corresponding OpenShift release.
Next, deploy the bpfman CRDs:
export BPFMAN_REL=0.5.6
kubectl apply -f https://github.com/bpfman/bpfman-operator/releases/download/v${BPFMAN_REL}/bpfman-crds-install.yaml
Next, deploy the bpfman-operator
, which will also deploy the bpfman-daemon
, which contains
bpfman-rpc
, bpfman
Library and bpfman-agent
:
kubectl apply -f https://github.com/bpfman/bpfman-operator/releases/download/v${BPFMAN_REL}/bpfman-operator-install.yaml
Finally, deploy an example eBPF program:
kubectl apply -f https://github.com/bpfman/bpfman/releases/download/v${BPFMAN_REL}/go-xdp-counter-install.yaml
kubectl get clusterbpfapplications
NAME NODESELECTOR STATUS AGE
go-xdp-counter-example Success 21s
kubectl get clusterbpfapplicationstates
NAME NODE STATUS AGE
go-xdp-counter-example-317f95f7 bpfman-deployment-control-plane Success 101s
There are other example program install yamls in the artifacts for each Release payload.
Use the following command to teardown the cluster: