<h2>Issue Description</h2>
<p>I am getting an error in fluent-bit basically saying it cant resolve host</p>
<pre><code>getaddrinfo(host='&lt;My Elastic Cloud Instance&gt;.aws.elastic-cloud.com:9243', err=4): Domain name not found
</code></pre>
<p>I suspect it has something to do with the port getting appended in the dns lookup, but I can't seem to see any settings that join the two together in my configuration's</p>
<p>I have verified that using the a dnsutil pod in the same namespace, I am able to resolve the host correctly</p>
<h2>Info that may be helpful</h2>
<p>Config Map output-elasticsearch.conf</p>
<pre><code>[OUTPUT]
    Name            es
    Match           *
    Host            ${CLOUD_ELASTICSEARCH_HOST}
    Port            ${CLOUD_ELASTICSEARCH_PORT}
    Cloud_ID        ${CLOUD_ELASTICSEARCH_ID}
    Cloud_Auth      ${CLOUD_ELASTICSEARCH_USER}:${CLOUD_ELASTICSEARCH_PASSWORD}
    Logstash_Format On
    Logstash_Prefix kube1
    Replace_Dots    On
    Retry_Limit     False
    tls             On
    tls.verify      Off
</code></pre>
<p>elasticsearch-configmap</p>
<pre><code>data:
  CLOUD_ELASTICSEARCH_HOST: &lt;MyCloudId&gt;.aws.elastic-cloud.com
  CLOUD_ELASTICSEARCH_ID: &gt;-
    elastic-security-deployment:&lt;Bunch of Random Bits&gt;
  CLOUD_ELASTICSEARCH_PORT: '9243'
</code></pre>
<p>env portion of my daemonset</p>
<pre><code>          env:
            - name: CLOUD_ELASTICSEARCH_HOST
              valueFrom:
                configMapKeyRef:
                  name: elasticsearch-configmap
                  key: CLOUD_ELASTICSEARCH_HOST
            - name: CLOUD_ELASTICSEARCH_PORT
              valueFrom:
                configMapKeyRef:
                  name: elasticsearch-configmap
                  key: CLOUD_ELASTICSEARCH_PORT
            - name: CLOUD_ELASTICSEARCH_ID
              valueFrom:
                configMapKeyRef:
                  name: elasticsearch-configmap
                  key: CLOUD_ELASTICSEARCH_ID
            - name: CLOUD_ELASTICSEARCH_USER
              valueFrom:
                secretKeyRef:
                  name: elasticsearch-secret
                  key: CLOUD_ELASTICSEARCH_USER
            - name: CLOUD_ELASTICSEARCH_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: elasticsearch-secret
                  key: CLOUD_ELASTICSEARCH_PASSWORD
            - name: FLUENT_ELASTICSEARCH_HOST
              value: elasticsearch
            - name: FLUENT_ELASTICSEARCH_PORT
              value: '9200'
</code></pre>

<p>Also, if you are using Elastic Cloud, try to decode the value of ${CLOUD_ELASTICSEARCH_ID} variable, remove the <code>:443</code> and encode it again.</p>
<p>I was getting this error and it was solved after doing this.</p>
