<p>I'm trying to deploy Elastic and Kibana in a Kubernetes cluster.</p>

<p>I have installed Elastic using Helm chart :</p>

<pre><code>helm repo add elastic https://helm.elastic.co
helm repo update
helm install stable/elasticsearch --namespace elastic --name elasticsearch --set imageTag=6.5.4
</code></pre>

<p>And Kibana using Helm chart :</p>

<pre><code>helm install elastic/kibana --namespace elastic --name kibana --set imageTag=6.5.4,elasticsearchURL=http://elasticsearch-client.elastic.svc.cluster.local:9200
</code></pre>

<p>I've checked from my Kibana pod, and this URL is reachable and produce the following result</p>

<pre><code>curl -v http://elasticsearch-client:9200
* About to connect() to elasticsearch-client port 9200 (#0)
*   Trying 10.19.251.82...
* Connected to elasticsearch-client (10.19.251.82) port 9200 (#0)
&gt; GET / HTTP/1.1
&gt; User-Agent: curl/7.29.0
&gt; Host: elasticsearch-client:9200
&gt; Accept: */*
&gt;
&lt; HTTP/1.1 200 OK
&lt; content-type: application/json; charset=UTF-8
&lt; content-length: 519
&lt;
{
  "name" : "elasticsearch-client-8666954ffb-kthcx",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "-MT_zbKySiad0jDJVc1ViQ",
  "version" : {
    "number" : "6.5.4",
    "build_flavor" : "oss",
    "build_type" : "tar",
    "build_hash" : "d2ef93d",
    "build_date" : "2018-12-17T21:17:40.758843Z",
    "build_snapshot" : false,
    "lucene_version" : "7.5.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}
</code></pre>

<p>The command line used in the Kibana pod to start (generated by the helm chart) is</p>

<pre><code>/usr/share/kibana/bin/../node/bin/node --no-warnings /usr/share/kibana/bin/../src/cli --cpu.cgroup.path.override=/ --cpuacct.cgroup.path.override=/ --elasticsearch.url=http://elasticsearch-client:9200
</code></pre>

<p>So it seems the Elastic cluster url is the right one, and reachable.</p>

<p>However, when I show the UI in my browser, I get the following page</p>

<p><a href="https://i.stack.imgur.com/xc28H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xc28H.png" alt="My Kibana UI seems to indicates an error and an invalid version"></a></p>

<p>So to sum up, both versions are identical :</p>

<ul>
<li>docker.elastic.co/elasticsearch/elasticsearch-oss:6.5.4</li>
<li>docker.elastic.co/kibana/kibana:6.5.4</li>
</ul>

<p>ElasticSearch url is correct, but Kibana  don't want to access ElasticSearch</p>

<p>I tried this myself and there's something with the Kibana docker image and/or Helm chart on how the parameter is passed into Kibana. Basically, the command line shows:</p>

<pre><code>--elasticsearch.url=http://elasticsearch-client.elastic.svc.cluster.local:9200
</code></pre>

<p>But if you shell into the container/pod you see that Kibana command line expect something different for the elasticsearch URL (<code>-e, --elasticsearch &lt;uri&gt;</code>):</p>

<pre><code>$ /usr/share/kibana/bin/kibana --help

  Usage: bin/kibana [command=serve] [options]

  Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch.

  Commands:
    serve  [options]  Run the kibana server
    help  &lt;command&gt;   Get the help for a specific command

  "serve" Options:

    -h, --help                 output usage information
    -e, --elasticsearch &lt;uri&gt;  Elasticsearch instance
    -c, --config &lt;path&gt;        Path to the config file, can be changed with the CONFIG_PATH environment variable as well. Use multiple --config args to include multiple config files.
    -p, --port &lt;port&gt;          The port to bind to
    -q, --quiet                Prevent all logging except errors
    -Q, --silent               Prevent all logging
    --verbose                  Turns on verbose logging
    -H, --host &lt;host&gt;          The host to bind to
    -l, --log-file &lt;path&gt;      The file to log to
    --plugin-dir &lt;path&gt;        A path to scan for plugins, this can be specified multiple times to specify multiple directories
    --plugin-path &lt;path&gt;       A path to a plugin which should be included by the server, this can be specified multiple times to specify multiple paths
    --plugins &lt;path&gt;           an alias for --plugin-dir
    --optimize                 Optimize and then stop the server
</code></pre>

<p>So, something is not translating the elasticsearch URL correctly.</p>

<p>It seems like the default is <code>localhost:9200</code> so you could try a sidecar container in your kibana deployment so that forwards everything on port <code>localhost:9200</code> to <code>elasticsearch-client.elastic.svc.cluster.local:9200</code>. Perhaps following <a href="https://serverfault.com/questions/547288/is-it-possible-to-redirect-bounce-tcp-traffic-to-an-external-destination-based">this</a></p>
