<p>I've read documentation of kubernetes annotations. </p>

<p>But I couldn't find basic example about using this annotations. For Example;</p>

<p>I have a deployment yaml like below:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    test_value: "test"
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.13
        ports:
        - containerPort: 80
</code></pre>

<p>How can I use this annotation named test_value and where.</p>

<p>Best Regards...</p>

<p>Just as <code>Labels</code>, <code>Annotations</code> are key-value pairs which represent metadata that is attached to a Kubernetes object. 
But contrary to <code>Labels</code>, which are internally utilized to find a collection of objects which satisfy specific conditions, the purpose of <code>Annotations</code> is simply to attach relevant metadata, which should not be used as a filter to identify those objects.</p>

<p>What if we wanted to describe whose person was responsible for generating a specific .yaml file? </p>

<p>We could attach such information to the Kubernetes's object, so that when we need to know who created such object, we can simply run <code>kubectl describe ...</code></p>

<p>Another useful example, could be to add an annotation to a <code>Deployment</code> before a rollout, explaining what modifications occurred on the new version of the Deployment object. That information could be retrieved later while checking the history of your deployment versions.</p>

<p>But as you have realized with the <code>Ingress</code> example, with <code>Annotations</code> we can also perform advanced configuration on such objects. This is not limited only to Ingress, and for instance you can also provide configuration for running Prometheus on a Kubernetes cluster. You can check the details <a href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/" rel="nofollow noreferrer">here</a>.</p>
