<p>How can I use <code>kubectl</code> or the API to retrieve the current image for containers in a pod or deployment?</p>

<p>For example, in a deployment created with the below configuration, I want to retrieve the value <code>eu.gcr.io/test0/brain:latest</code>.</p>

<pre><code>apiVersion: v1
   kind: Deployment
   metadata:
     name: flags
   spec:
     replicas: 6
     template:
       metadata:
      labels:
        app: flags
       spec:
         containers:
         - name: flags
           image: eu.gcr.io/test0/brain:latest
</code></pre>

<p>From <code>kubectl</code> 1.6 the <code>-o wide</code> option does this, so</p>

<pre><code>kubectl get deployments -o wide
</code></pre>

<p>will show the current image in the output.</p>
