<p>Each Kubernetes deployment gets this annotation:</p>

<pre><code>$ kubectl describe deployment/myapp
Name:                   myapp
Namespace:              default
CreationTimestamp:      Sat, 24 Mar 2018 23:27:42 +0100
Labels:                 app=myapp
Annotations:            deployment.kubernetes.io/revision=5
</code></pre>

<p>Is there a way to read that annotation (<code>deployment.kubernetes.io/revision</code>) from a pod that belongs to the deployment?</p>

<p>I tried Downward API, but that only allows to get annotations of the pod itself (not of its deployment).</p>

<p>It has been a long time but here is what I do to get a specific annotation :</p>

<pre><code>kubectl get ing test -o jsonpath='{.metadata.annotations.kubernetes\.io/ingress\.class}'
</code></pre>

<p>So for you it would be :</p>

<pre><code>kubectl get deploy myapp -o jsonpath='{.metadata.annotations.deployment\.kubernetes\.io/revision}'
</code></pre>

<p>I hope it helps.</p>
