jilochess.blogg.se

Kubernetes annotations example
Kubernetes annotations example













One 5-year-old Sept 2014 GitHub issue thread has details of the origin of annotations in K8s. If someone needs to have a deeper understanding of the project, reading threads of project-related GitHub issues is the best way to understand the thought process of a developer mindset. Kubernetes labels allow you to identify, select and operate on Kubernetes objects, whereas Annotations are non-identifying metadata and do none of these things. Kubernetes labels and annotations are both ways of adding metadata to Kubernetes objects.

kubernetes annotations example

As we all know Kubernetes also have labels which are also used to identify metadata. Annotations in KubernetesĮnough of origin of the concept of annotation now we should see how & why the need for annotations arise in Kubernetes. But the introduction of annotations standardized this requirement.ĭigging deep in search for content of Annotation in Java I find a very interesting piece of an article discussing Annotation vs Comments in Java. Prior to annotations marker interfaces, transient keywords, document comments, etc were used to explain or provide identifiers for the code. In the words of Java programmers, Annotation is a special kind of Java construct used as metadata to decorate a class, method, field, parameter, variable, constructor, or package.Īnnotations provide a standard way of defining metadata in code. So annotations are metadata for code.But why we need Annotations? Metadata is data which describes other data.

kubernetes annotations example

One word to explain annotation is metadata. I won't shy away in saying that Annotations of K8s are kinda borrowed from Java. This query led me to write an elaborative blogpost about concept & origin of Annotations in Kubernetes and in general programming.

kubernetes annotations example

In his own words "Annotation is the concept, not able to understand, can you elaborate the concept?" Its seems a very genuine query from first time user. We recently got a query from a course subscriber about "Annotations" and its need in Kubernetes.















Kubernetes annotations example