![]() If you want to annotate your setup with data which will help people or tools, but not Kubernetes itself, it’s better to put it into annotation meta data.Ĭould your current workflows benefit from having direct access to something like timestamps, commit SHAs or the name of the person who is responsible for certain resources? Just add an annotation step to your current deployment pipeline. Make sure that the data you have in mind abides by the constraints. If you need to point Kubernetes to a group of resources, labels are the way to go. ![]() The metadata in an annotation can be small or large, structured or unstructured, and can include characters not permitted by labels. Adding custom annotations to Kubernetes YAMLs cat myproject/deploy/yamls/myproject-ingress.yaml ls customizations/add-custom-kubernetes-annotation ingress. Huge annotations, the keys and values are not constrained like labels are. Over them within Kubernetes, but they can be used by external tools and libraries.Īs the internal performance of Kubernetes is not negatively impacted by AnnotationsĪre used for non-identifying information. Non-identifying information should be recorded using annotations. We don’t want to pollute labels with non-identifying, especially large and/or structured, data. This way, queries can beĮvaluated quickly, using optimized data structures and algorithms. LabelsĬontain identifying information and are a used by selector queries or within selector sections in object definitions.Īs values is constrained. The distinction is easy to explain,īut takes a bit of time to understand from the docs. What’s the difference between labels and annotations?Īt first glance, both seem to be simple key-value pairs, meant toĪdd metadata to a Kubernetes setup.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |