# Export file inside pod kubernetes

**URL:** <https://discuss.elastic.co/t/export-file-inside-pod-kubernetes/285668>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [October 1, 2021, 10:48am UTC](https://discuss.elastic.co/t/export-file-inside-pod-kubernetes/285668 "2021-10-01T10:48:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fferraro87](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@fferraro87](https://discuss.elastic.co/u/fferraro87)\
**Post date:** [October 1, 2021, 10:48am UTC](https://discuss.elastic.co/t/export-file-inside-pod-kubernetes/285668/1 "2021-10-01T10:48:38Z")

</div>

Hi,  
i'm trying to export some file from pods inside my cluster k8s.  
now i've that configmap :

```auto
apiVersion: v1
kind: ConfigMap
metadata:
  name: filebeat-config
  namespace: kube-system
  labels:
    k8s-app: filebeat
data:
  filebeat.yml: |-
    filebeat.config:
      #inputs:
        # Mounted `filebeat-inputs` configmap:
        #path: ${path.config}/inputs.d/*.yml
        # Reload inputs configs as they change:
        #reload.enabled: false
      modules:
        path: ${path.config}/modules.d/*.yml
        # Reload module configs as they change:
        reload.enabled: false

    # To enable hints based autodiscover, remove `filebeat.config.inputs` configuration and uncomment this:
    filebeat.autodiscover:
      providers:
        - type: kubernetes
          templates:
            - condition:
                - and:
                  - has_fields: ['app.kubernetes.io/name']
                  - equals:
                      app.kubernetes.io/name=app1
              config:
                - prospectors:
                  paths:
                    - /tmp/access_log.log
                  tags: ["access_log"]
    processors:
      - add_kubernetes_metadata:
          in_cluster: true

    #output.elasticsearch:
      #hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']
      #username: ${ELASTICSEARCH_USERNAME}
      #password: ${ELASTICSEARCH_PASSWORD}
    output.logstash:
      hosts: ['192.168.2.10:5043']

```

but i've that error inside filebeat pods when starting :

```auto
2021-10-01T10:45:17.862Z ERROR instance/beat.go:956 Exiting: error in autodiscover provider settings: error setting up kubernetes autodiscover provider: missing or │
│ invalid condition

```

but where i'm wrong?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 29, 2021, 12:48pm UTC](https://discuss.elastic.co/t/export-file-inside-pod-kubernetes/285668/2 "2021-10-29T12:48:44Z")

</div>

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