Kubernetes Hints-based Autodiscover: Excluding a namespace

I'm using the hints-based autodiscover, and I'm wondering if there is a way to automatically exclude all pods in a given namespace. I'd prefer not to have to go annotate all of the pods in the namespace, if possible. I tried this config:

filebeat.autodiscover:
  providers:
    - type: kubernetes
      host: ${NODE_NAME}
      hints.enabled: true
      hints.default_config:
        type: container
        paths:
          - /var/log/containers/*${data.kubernetes.container.id}.log
      appenders:
        - type: config
          condition.equals:
            kubernetes.namespace: "kube-system"
          config:
            enabled: false
processors:
  - add_cloud_metadata:
  - add_host_metadata:

output.elasticsearch:
  hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']

I tried the appender here, but it doesn't seem to be effective.

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