annotation
A key-value note attached to a Kubernetes object that tools read for extra configuration.
In more detail
Unlike labels, annotations are not used to select objects; they carry settings for controllers and tools. Values can be long strings, such as timeouts or the name of a certificate issuer.
Examples
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" keeps slow streams opencert-manager.io/cluster-issuer: letsencrypt-prodkubectl -n kube-system get pod "$pod" -o jsonpath='{.metadata.annotations.kubernetes\.io/config\.source}'Related terms
- Ingress — A Kubernetes object that describes how outside HTTP traffic reaches services inside the cluster, by host name and URL path.
- cert-manager — A Kubernetes add-on that requests TLS certificates, stores them as secrets and renews them before they expire.
- Kubernetes label — A small key and value pair attached to an object, such as app=web, that other objects and commands use to find it.
- config checksum annotation — A hash of a ConfigMap or Secret placed in a pod template annotation, so that changing the configuration changes the template and triggers a rollout.
- metadata — Data that describes other data, such as a file name, a creation time or a package version.
Taught in
- Rolling Updates And Rollbacks — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Deployment: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Kubernetes Ingress, Routing & TLS Termination — Production Full-Stack Engineering
- Control Plane: etcd, API Server, Scheduler, Controllers — Kubernetes: Production-Grade Container Orchestration
- Namespaces, Labels And Declarative Manifests — Kubernetes: Production-Grade Container Orchestration
- Pod Security Admission And Pod Security Standards — Kubernetes: Production-Grade Container Orchestration