<p>How can I using kubectl cmd to get specific pod's commit sha1 like:</p>

<pre><code>kubectl get git_commit_sha1 [pod_name]
</code></pre>

<p>There is no way to achieve what you want at the moment using kubectl. They only possible way would be if your docker image have <code>git</code> command built in. In that case you could use <code>kubectl exec</code> to get the information you want. </p>

<p>Example: </p>

<pre><code>$ kubectl exec -ti podname -- git show
</code></pre>

<p>Alternatively, if you really think your idea makes sense and may be useful to more people, you can open a feature request on <a href="https://github.com/kubernetes/kubectl/issues" rel="nofollow noreferrer">kubernetes github issues page</a>.</p>
