# Filebeat not connecting to elasticsearch cluster running with ECK

**URL:** https://discuss.elastic.co/t/filebeat-not-connecting-to-elasticsearch-cluster-running-with-eck/278183
**Category:** Elastic Cloud on Kubernetes (ECK)
**Created:** [July 8, 2021, 11:57am UTC](https://discuss.elastic.co/t/filebeat-not-connecting-to-elasticsearch-cluster-running-with-eck/278183 "2021-07-08T11:57:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![aksh\_18](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@aksh\_18](https://discuss.elastic.co/u/aksh_18)
#### Post date: [July 8, 2021, 11:57am UTC](https://discuss.elastic.co/t/filebeat-not-connecting-to-elasticsearch-cluster-running-with-eck/278183/1 "2021-07-08T11:57:49Z")

</div>

Hi All,

I have deployed ES cluster and kibana with the help of ECK. I am using filebeat-kubernetes.yaml to deploy filebeat. I deployed metricbeat with metricbeat-kubernetes.yaml and its running fine. But even after applying same configuration to filebeat yaml it is not able to connect to ES. Following are the logs related TLS and ES url. Please help on this.

```auto
2021-07-08T11:47:43.229Z INFO [index-management] idxmgmt/std.go:184 Set output.elasticsearch.index to 'filebeat-7.13.2' as ILM is enabled.
2021-07-08T11:47:43.229Z WARN [cfgwarn] tlscommon/config.go:105 DEPRECATED: Treating the CommonName field on X.509 certificates as a host name when no Subject Alternative Names are present is going to be removed. Please update your certificates if needed. Will be removed in version: 8.0.0
2021-07-08T11:47:43.229Z INFO eslegclient/connection.go:99 elasticsearch url: https://quickstart-es-http:9200
2021-07-08T11:47:43.229Z INFO [publisher] pipeline/module.go:113 Beat name: oke-cgusmlcotva-nti7iapgfvq-sl4fjm436ua-2
2021-07-08T11:47:43.230Z INFO [monitoring] log/log.go:117 Starting metrics logging every 30s
2021-07-08T11:47:43.230Z INFO instance/beat.go:473 filebeat start running.
2021-07-08T11:47:43.231Z INFO memlog/store.go:119 Loading data file of '/usr/share/filebeat/data/registry/filebeat' succeeded. Active transaction id=0
2021-07-08T11:47:43.231Z INFO memlog/store.go:124 Finished loading transaction log file for '/usr/share/filebeat/data/registry/filebeat'. Active transaction id=0

```

---

<div class="post-metadata">

### Author: ![abrx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abrx/32/43881_2.png) [@abrx](https://discuss.elastic.co/u/abrx)
#### Post date: [July 30, 2021, 12:56pm UTC](https://discuss.elastic.co/t/filebeat-not-connecting-to-elasticsearch-cluster-running-with-eck/278183/2 "2021-07-30T12:56:31Z")

</div>

Did you configure the use of password and TLS in order to index data ?

I suggest you to put them in the same namespace if possible in order to:

- use the elastic ServiceAccount created by ECK in order to ingest data
- mount the secret carrying the ES certificate in your beats pods
- maybe adress ES directly via its service, using `<service_name>.<namespace> url which is known by the pods inside the namespace, so you avoid loading your IngressManager and bypass any authentification you put in it (you still have to use a valide ES user to ingest/read data)`

---

<div class="post-metadata">

### Author: ![aksh\_18](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@aksh\_18](https://discuss.elastic.co/u/aksh_18)
#### Post date: [August 17, 2021, 8:22am UTC](https://discuss.elastic.co/t/filebeat-not-connecting-to-elasticsearch-cluster-running-with-eck/278183/3 "2021-08-17T08:22:13Z")

</div>

Thanks for the reply @abrx

There was problem regarding harvesting of the log files. Filebeat was not able to harvest the data from the given docker log file paths. But when I uncommented autodiscover section of the filebeat-kubernetes.yaml , it started ingesting logs into elasticsearch.

---

<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: [September 14, 2021, 8:22am UTC](https://discuss.elastic.co/t/filebeat-not-connecting-to-elasticsearch-cluster-running-with-eck/278183/4 "2021-09-14T08:22:16Z")

</div>

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