Filebeat Kubernetes autodiscover provider is getting failed with "/var/run/secrets/ no such file or directory" Error

Hi - I am using following configuration to autodiscover filebeat pods

- type: kubernetes
- condition:
kubernetes.namespace: default
- type: docker
- "${}"

I am getting below issue. Please help me to resolve.
"Exiting: Unable to get in cluster configuration: open /var/run/secrets/ no such file or directory"


hi @Debashis, the kubernetes autodiscover provider expects to be running inside the cluster, is this the current situation?

No @MarianaD. Filebeat is running on host machine where kubernetes is installed. It is not running inside a pod.

Hi @Debashis,

Filebeat kubernetes autodiscover provider will try to autoconfigure itself when run inside Kubernetes. As you are running it from the host, you need to pass certain parameters to make it work. Docs are here:

You will basically need to provide kube_config, pointing to the kubernetes client config file to connect to the cluster. host may also be needed, to be set to the name of the node in the cluster, probably host: ${HOSTNAME} will do.

Best regards

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