Attempting to acquire leader lease ... Get "": Forbidden


I want to monitor my Kubernetes cluster using metricbeat, and I'm using for that metricbeat autodiscover feature . Also I use a custom docker image based on my custom debian bullseye image.

I made all the necessary configurations : Roles and ClusterRoles.

The problem is that the autodiscover didn't work and I get this error message :

E0504 14:41:40.623715       1 leaderelection.go:330] error retrieving resource lock bilalnamespace/metricbeat-cluster-leader: Get "": Forbidden 

Also I tried the official docker image and it works fine.
I didn't understand what is the problem, do you have any ideas ?

to deploy on Kubernetes I used the official yaml file.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.