DELAPARRA
Index
Color
NL
Category: Kubernetes

annotation

Explained by Updated

What is annotation?

annotation: A key/value note attached to an object for tools and humans — not used for selection. Holds metadata like ingress config or change cause. An annotation in Kubernetes is a key and value attached to an object, such as a Deployment or Ingress. It stores extra information for tools and people. Unlike labels, annotations are not used to select objects.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about annotation

How is annotation used in practice?

Many tools are configured through annotations. An ingress controller reads nginx.ingress.kubernetes.io/proxy-body-size to allow larger uploads, and cert-manager reads annotations to know which certificate to issue. Annotations can also record who deployed something or which commit is running.

What should you keep in mind with annotation?

Use labels for things you filter or group by, such as app or environment. Use annotations for everything else. Values can be long and structured, but keep them meaningful. A typo in an annotation key fails silently, because Kubernetes accepts any key, so check the exact spelling in the tool's documentation when a setting seems ignored.

What does an example of annotation look like?

metadata: annotations: nginx.ingress.kubernetes.io/rewrite-target: / kubernetes.io/change-cause: "bump to v1.27"

At a glance

CategoryKubernetes
Explained by
Updated

More Kubernetes terms

All terms starting with A

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.