qerttry.blogg.se

Kubernetes annotations
Kubernetes annotations







Let’s create a pod using below yaml file.Īfter creating the pod, we use below two commands to check the attached annotation:

kubernetes annotations

This annotation is the ‘/last-applied-configuration’. There are default annotations attached by the ‘kubectl’ to every Kubernetes objects whether we attach annotations to the Kubernetes object or not. We can add these details under annotations under metadata primitives. We have an nginx pod and we want to attach annotations like on-call person pager number, URL or name of the image registry and link of knowledge base article, etc. Let’s understand the examples of Kubernetes Annotations with Syntax. For example, adding pager information of the responsible person, the link of a knowledge base article, etc. Annotations are not helpful for Kubernetes itself however it provides great help to users, people, or tools interacting with the Kubernetes objects as it holds useful information so that one can understand the objects properly and act it on wisely. It provides additional information about the Kubernetes objects that can be used by tools and libraries. We can include metadata in annotation which has characters that are not allowed in labels.

kubernetes annotations

Annotation can be structured or unstructured and small or large.

kubernetes annotations

Annotation is not used by any Kubernetes component to perform any operation or any manipulation to the cluster. In simple words, annotations are not used to identify and select Kubernetes objects. Annotation is used to add additional metadata to Kubernetes objects that are non-identifying which means we cannot use the selector to query Kubernetes objects that have a specific annotation attach to it.









Kubernetes annotations