<h1>Question</h1>

<p>What is the purpose of the K8S_HOST_URL configuration parameter in EFK? In EFK, K8S_HOST_URL exists as an environment variable and it looks being used to communicate to the Kubernetes API server by fluentd as being specified in the <a href="https://github.com/openshift/origin-aggregated-logging/blob/877d84296ce113fbafca6177612741054ed5a584/fluentd/configs.d/openshift/filter-k8s-meta.conf" rel="nofollow noreferrer">filter-k8s-meta.conf</a> of the fluentd configuration.</p>

<p>Looking for the documentation but not in the OpenShift <a href="https://docs.openshift.com/container-platform/3.4/install_config/aggregate_logging.html" rel="nofollow noreferrer">Aggregating Container Logs</a> documentation. Searched in Google but could not find a definite answer.</p>

<p>Please suggest the documentation which explains in detail. </p>

<p>First "<code>K8S_HOST_URL</code>" does not show up in <a href="https://github.com/elastic/elasticsearch/search?utf8=%E2%9C%93&amp;q=K8S_HOST_URL&amp;type=" rel="nofollow noreferrer"><code>elastic/elasticsearch</code></a>, <a href="https://github.com/fluent/fluentd/search?utf8=%E2%9C%93&amp;q=K8S_HOST_URL&amp;type=" rel="nofollow noreferrer"><code>fluent/fluentd</code></a> or <a href="https://github.com/elastic/kibana/search?utf8=%E2%9C%93&amp;q=K8S_HOST_URL&amp;type=" rel="nofollow noreferrer"><code>elastic/kibana</code></a> (the 3 projects from "EFK")</p>

<p>It does show up only in <a href="https://github.com/openshift/origin-aggregated-logging/search?utf8=%E2%9C%93&amp;q=K8S_HOST_URL&amp;type=" rel="nofollow noreferrer"><code>openshift/origin-aggregated-logging</code></a>, which is the repo with the image definitions for the components of the logging stack as well as tools for building and deploying them.</p>

<p>So this seems to be how Openshift deploys its stack (through Kubernetes), which it will monitor (see "<a href="https://github.com/openshift/origin-aggregated-logging/blob/14c08207d03e60c84786d325a677380c56453469/docs/proposals/kube_events_design_doc.md" rel="nofollow noreferrer">Collect and store Kubernetes events</a>")</p>

<p>See also "<a href="https://github.com/openshift/origin-aggregated-logging/blob/a7b161c011f3485edda6978d36a0d703628bd024/docs/mux-logging-service.md" rel="nofollow noreferrer">mux-logging service</a>" (still from <a href="https://github.com/openshift/origin-aggregated-logging" rel="nofollow noreferrer"><code>openshift/origin-aggregated-logging</code></a>):</p>

<blockquote>
  <p>Fluentd gets Kubernetes metadata to enrich each container log message with the namespace UUID, the pod UUID, and pod labels and annotations. </p>
</blockquote>
