<p>I'm trying to get the name of the container image from within the container.</p>
<p>I tried to look around the Downward APIs, but it seems that it's not possible:<br />
<a href="https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/</a></p>
<p>For now my workaround is:</p>
<pre><code>      env:
        - name: IMAGE
          value: &quot;myimage:latest&quot;
</code></pre>
<p>Is there maybe a better way?</p>

<p>Your solution is probably OK, assuming you build your containers with CI/CD. Please see <a href="https://stackoverflow.com/questions/30690186/how-do-i-access-the-kubernetes-api-from-within-a-pod-container">this answer</a> about how to access the kubernetes API from within a cluster as an alternative. Here's the link to <a href="https://kubernetes.io/docs/api-reference/v1.6/#pod-v1-core" rel="nofollow noreferrer">POD API docs</a> which should contain the image information.</p>
