# Fluentbit not connecting to elasticsearch cluster running in Kubernetes

**URL:** <https://forum.opensearch.org/t/fluentbit-not-connecting-to-elasticsearch-cluster-running-in-kubernetes/3187>\
**Category:** Security\
**Created:** [June 26, 2020, 11:09pm UTC](https://forum.opensearch.org/t/fluentbit-not-connecting-to-elasticsearch-cluster-running-in-kubernetes/3187 "2020-06-26T23:09:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mussa](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@mussa](https://forum.opensearch.org/u/mussa)\
**Post date:** [June 26, 2020, 11:09pm UTC](https://forum.opensearch.org/t/fluentbit-not-connecting-to-elasticsearch-cluster-running-in-kubernetes/3187/1 "2020-06-26T23:09:34Z")

</div>

Hi

I have deployed opensdistro for elastiseach on kubernetes using the helm charts with standard configs .I am now deploying fluentbit in kubernetes using the following configs . However I am getting the follow errror  
Just wondering if I am missing anything on the configs . I feel this is something related to security however not sure what additional configs are required .

```
` output-elasticsearch.conf: |
[OUTPUT]
    Name es
    Match *
    Host ${FLUENT_ELASTICSEARCH_HOST}
    Port ${FLUENT_ELASTICSEARCH_PORT}
    HTTP_User ${FLUENT_ELASTICSEARCH_USER}
    HTTP_Passwd ${FLUENT_ELASTICSEARCH_PASSWORD}
    Logstash_Format On
    Replace_Dots On
    Retry_Limit False`

```

Error :

```
[2020/06/26 23:07:58] [warn] [engine] failed to flush chunk '1-1593201658.5785179.flb', retry in 1420 seconds: task_id=39, input=tail.0 > output=es.0
[2020/06/26 23:07:58] [error] [http_client] broken connection to opendistro-es-client-service:9200 ?
[2020/06/26 23:07:58] [warn] [out_es] http_do=-1 URI=/_bulk
[2020/06/26 23:07:58] [warn] [engine] failed to flush chunk '1-1593202033.5107906.flb', retry in 1379 seconds: task_id=428, input=tail.0 > output=es.0
$

```

---

<div class="post-metadata">

**Author:** ![shinerrs](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@shinerrs](https://forum.opensearch.org/u/shinerrs)\
**Post date:** [June 29, 2020, 8:39am UTC](https://forum.opensearch.org/t/fluentbit-not-connecting-to-elasticsearch-cluster-running-in-kubernetes/3187/2 "2020-06-29T08:39:09Z")

</div>

Hi,

Since fluentbit does not have a Cache built in, its recommended to add fluentd to your stack.

Just to confirm, their in the same namespace? you dont have it, elasticsearch in 1 namespace and fluentbit in another?

Services can not communicate across namespace unless using the full qualified DNS name.

Can you please clarify?
