<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/.):no" rel="nofollow">http://kubernetes.io/docs/troubleshooting/.):no</a></p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.): create service</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):<br>
FEATURE REQUEST</p>

<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:</p>
<p dir="auto">Many apps need to know where their peers are, to do some sort of replication or sharding. (hopefully this isn't a duplicate; I did search...)</p>
<p dir="auto">We have the "endpoints" concept. If we provided easy-to-use plumbing, that could make it easier to use the above sort of app.</p>
<p dir="auto">Having kubelet stuff them in env variables is not quite right, because the list could change.</p>
<p dir="auto">So I propose making a little container that watches endpoints, and writes out a config file whenever they change.</p>
<p dir="auto">It could take the service to watch as an env var. It should optionally write out a file (using the go template language), optionally run a command, optionally send HUP or whatever else seems useful.</p>
<p dir="auto">People could use this as a sidecar container in their pod, to get their app joining the rest of their cluster.</p>