Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example on K8s not working #287

Closed
chenele opened this issue Oct 9, 2023 · 1 comment
Closed

Example on K8s not working #287

chenele opened this issue Oct 9, 2023 · 1 comment

Comments

@chenele
Copy link

chenele commented Oct 9, 2023

Hi

Trying to run the examples on local K8s cluster with the following simple spec:

apiVersion: v1
kind: Service
metadata:
  name: metrics-test
  labels:
    app.kubernetes.io/name: metrics-test
spec: 
  ports:
    - name: http
      port: 3000
      protocol: TCP
      targetPort: 3000
  selector:
    app.kubernetes.io/name: metrics-test
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: metrics-test
  labels:
    app.kubernetes.io/name: metrics-test
spec:  
  selector:
    matchLabels:
      app.kubernetes.io/name: metrics-test
  template:
    metadata:
      labels:
        app.kubernetes.io/name: metrics-test
    spec:
      terminationGracePeriodSeconds: 30
      containers:
        - name:metrics-test
          image: ebpf_examples
          imagePullPolicy: Never
          securityContext:
            privileged: true
            runAsUser: 0
          args:
            - --config.dir
            - examples
            - --config.names
            - timers         
          ports:
            - name: http
              containerPort: 3000
              protocol: TCP  

I see the following error:
Error attaching exporter: error loading bpf object from "examples/timers.bpf.o" for config "timers": failed to load BPF object: no such process

Image was built with docker build --tag ebpf_exmample --target ebpf_exporter_with_examples .
any idea?

@bobrik
Copy link
Contributor

bobrik commented Oct 9, 2023

Could you run it with --debug? What kernel version are you using?

@bobrik bobrik closed this as completed Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants