<p>I can't find this in the k8s documentation, I'm just wondering what are the default environment variables that are created in every container by k8s. Not user created defaults, but like (and this is just an example) maybe something like <code>{service_name}_PORT</code> or something like that. I just wanna know what information is available in a container by default.</p>

<p>From the <a href="https://kubernetes.io/docs/concepts/containers/container-environment/" rel="nofollow noreferrer">K8S Documentation</a>:</p>
<p><strong>Container information - ENV's</strong></p>
<p>The hostname of a Container is the name of the Pod in which the Container is running. It is available through the hostname command or the gethostname function call in libc.</p>
<p>The Pod name and namespace are available as environment variables.</p>
<p>These are the additional ENV's in a MiniKube cluster I have running:</p>
<pre><code>HOSTNAME=something-api-234234234-skm70
SHLVL=1
HOME=/root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
KUBERNETES_SERVICE_PORT_HTTPS=443
KUBERNETES_SERVICE_HOST=x.x.x.x
PWD=/
</code></pre>
<p>User defined environment variables from the Pod definition are also available to the Container, as are any environment variables specified statically in the Docker image.</p>
<p><strong>Cluster Information - ENV's</strong></p>
<p>A list of all services that were running when a Container was created is available to that Container as environment variables. Those environment variables match the syntax of Docker links.</p>
<p>For a service named <code>foo</code> that maps to a container port named <code>bar</code>, the following variables are defined:</p>
<pre><code>FOO_SERVICE_HOST=&lt;the host the service is running on&gt;
FOO_SERVICE_PORT=&lt;the port the service is running on&gt;
</code></pre>
