Kubernetes annotations are key-value pairs attached to Kubernetes objects, providing a flexible way to extend the functionality of your Kubernetes resources without altering their internal specifications. These annotations serve as a tool to store additional metadata to tailor behavior, orchestrate tools, and interact seamlessly with third-party utilities that complement your Kubernetes environment. Today, we're excited to announce that Qovery supports the declaration of Custom Annotations for your Kubernetes clusters đ„ł.
Using annotations in Kubernetes gives you more control over Kubernetes internal resources like Ingress Controllers, Services, Pods, Deployment, Statefulset, ... and even third-party services. They provide enhanced features and controls without directly modifying the primary resource definitions.
Setting Custom Annotations with Qovery
At Qovery, setting up custom Kubernetes annotations is designed to be straightforward and efficient:
1/ Navigate to your Qovery dashboard and select your application.
2/ In the application settings, scroll down the "General" tab and add your Annotations Group.
Create my annotation group
3/ Select the Annotations Groups you want to attach to your app.
I attach my annotations group to my app
For enhanced management, Qovery introduces Annotations Groups, which allow you to group multiple annotations and apply them across various services, streamlining management and updates.
4/ Finally, save and deploy your changes.
Examples of Kubernetes Annotations
Here are some Kubernetes annotations that you could use:
DataDog Monitoring
This annotation integrates Nginx pods with DataDog's monitoring system to collect detailed metrics.
Another example: This annotation sets the stabilization window, within a period during which the HPA does not decrease the number of replicas, even if there is no high load. This helps to prevent frequent scale-down operations which could lead to performance degradation during fluctuating loads.
Custom Kubernetes annotations on Qovery are now generally available to all users. With the Qovery Annotations Groups feature, Qovery enhances the power of Kubernetes annotations by allowing you to manage them as templates. This feature promotes reusability and ensures consistency across multiple services, simplifying the management and scaling of your Kubernetes applications. Explore this new capability and empower your team to manage Kubernetes more effectively, all within the streamlined developer experience that Qovery promises.
Start using custom Kubernetes annotations with Qovery today and take your infrastructure management to the next level!
Arbitrary key-value metadata attached to a Kubernetes object. Unlike labels, annotations are not used to select or group objects. They exist to carry information for other systems: ingress controllers, monitoring agents, secret injectors and other controllers read them to change behaviour without altering the resource definition itself.
What is the difference between labels and annotations in Kubernetes?
Labels are identifying metadata that selectors query, so they drive scheduling, service routing and grouping, and they are constrained in length and character set. Annotations are non-identifying and cannot be selected on, but they accept much larger and more structured values, including JSON.
What can you use Kubernetes annotations for?
Configuring behaviour in controllers that watch your resources. Common cases include rewriting paths on an NGINX ingress, telling a Datadog agent how to scrape a pod, and instructing HashiCorp Vault to inject secrets. The pattern is the same: a third-party controller reads the annotation and acts on it.
Which Kubernetes resources support annotations?
All of them. Annotations are part of the standard object metadata, so Pods, Deployments, Services, StatefulSets, Ingresses and custom resources all accept them. What varies is which controller is watching and therefore which annotations have any effect on a given resource.
How do you apply the same annotations across multiple services?
Copying them per service is where drift starts. Grouping the annotations once and attaching the group to each service keeps them consistent and makes an update a single change. In Qovery that grouping is called an Annotations Group, defined once in application settings and attached wherever it is needed.
Romaric founded Qovery to make Kubernetes accessible to every engineering team. He writes about platform strategy, developer experience, and the future of cloud infrastructure.
Next step
Agents ship fast. Guardrails keep them safe.
Qovery ensures every agent action is scoped, audited, and policy-checked. Start deploying in under 10 minutes.