title: What is the difference between. annotations and labels in in Kubernetes?
body: <p>I'm trying to wrap my head around the difference between annotations and labels.</p>
  <p>My understanding of annotations is that it is metadata that adds key-value pairs that cannot be used by Kubernetes for identifying/filtering the resource.</p>
  <p>Labels on the other hand are metadata key-value pairs that can be used by Kubernetes to identify/filter the resource.</p>
  <p>Is this right? If this is so, then what is the practical use of annotations? Is it something to do with performance? Where labels are under the scanner of Kubernetes for filters and annotations are purely for adding metadata that is just informational?</p>
  <p>But I've seen in cases where deployments needing Nginx or ingress capabilities using annotations. Then how does this get searched or used. Why are labels not used here instead?</p>
  <p>When do we use annotations over labels and vice-versa? What are the pros and cons of each?</p>
  <p>My understanding is rather limited here, however reading the official docs has not really helped me understand the use case of when do I use annotations vs labels.</p>