Autodiscover Kubernetes configuration

I have multiple namespaces, but I don't want to choose all of them
Can I configure multiple namespaces?
document

Hi @ZMMWMY,

Could you explain a little bit more what you are trying to do? If you only want to get logs from a few namespaces this is what you could do:

filebeat.autodiscover:
  providers:
    - type: kubernetes
      templates:
       - condition:
            or:
              equals:
                kubernetes.namespace: kube-system
              equals:
                kubernetes.namespace: default
              equals:
                kubernetes.namespace: mycustomnamespace
          config:
            - type: container
              paths:
                - /var/log/container/*-${data.kubernetes.container.id}.log

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