Skip to content

eBPF Tools on Minikube fails #21944

@fstab

Description

@fstab

What Happened?

Hi, I am having trouble running an eBPF-based instrumentation tool on Minikube nodes.

To debug this, I found https://minikube.sigs.k8s.io/docs/tutorials/ebpf_tools_in_minikube/ and tried the two commands there:

minikube start --vm=true
minikube ssh -- docker run --rm   --privileged   -v /lib/modules:/lib/modules:ro   -v /usr/src:/usr/src:ro   -v /etc/localtime:/etc/localtime:ro   --workdir /usr/share/bcc/tools   zlim/bcc ./execsnoop

It fails with

chdir(/lib/modules/6.6.95/build): No such file or directory
Traceback (most recent call last):
  File "/usr/share/bcc/tools/execsnoop", line 165, in <module>
    b = BPF(text=bpf_text)
  File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 325, in __init__
    raise Exception("Failed to compile BPF text")
Exception: Failed to compile BPF text
ssh: Process exited with status 1

So, it looks like there is a general issue with eBPF on Minikube.

Any advice how to run eBPF programs on a Minikube node?

Attach the log file

log.txt

Operating System

Redhat/Fedora

Driver

KVM2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions