Skip to content


Komodor kubernetes annotations

Komodor annotations (AKA Komodor as code), is a method to allow users to configure everything related to Komodor as part of their native k8s yaml. Komodor annotations should be placed in the deployment resource annotations (annotations set on the pod template are ignored)


Configure the Slack channel notification as part of the deployment object.


Annotation Values Description Example Default string Slack channel name for all deploy events notifications “deploy-brain-team" string Slack channel name for failed deploy events notifications “deploy-failed" string Slack channel name for successful deploy events notifications “deploy-success" string Slack channel for health event notifications “alerts-p1”

Define quick-links for a specific service, making it easier to get context when troubleshooting.


In the form of


Annotation Values Description Example Default url Url for Grafana health dashboard related to this service. “deploy-brain-team" url Url for datadog dashboard with bad http “alerts-p1” url The playbook for the company playbook “120” “30”

For each deployment version, you can add a quick link with the job url.



Annotation Values Description Example url Link to Jenkins job that deploys the service

For each deployment version, you can add a quick link with the relevant filters already in place!



Annotation Values Description Example url Link for the specific version logs url Link for the specific version Sentry issues

You can create custom links to external and internal applications by crafting your own URL to the appplication using a skeleton URL and placeholders provided by Komodor. Just copy the URL of the application you want to link to, identify the placeholders in the URL that are used to query the appplication, and replace them with placeholders for your own use. Please find the below examples as references for common applications.



Annotation Values Description Example url Link for the custom URL, coralogix${cluster}%22))%20AND%20(coralogix.metadata.namespace:(%22${namespace}%22))%20AND%20(coralogix.metadata.service:(%22${service}%22))&time=from:${timestampStart=YYYY-MM-DDTHH:mm:ss.SSSZ},to:${timestampEnd=YYYY-MM-DDTHH:mm:ss.SSSZ} url Link for the custom URL,!(message,kubernetes.namespace_name,kubernetes.container_name,params.clusterName),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'logzioCustomerIndex',key:kubernetes.namespace_name,negate:!f,params:(query:default),type:phrase),query:(match_phrase:(kubernetes.namespace_name:${namespace}))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'logzioCustomerIndex',key:params.clusterName,negate:!f,params:(query:main),type:phrase),query:(match_phrase:(params.clusterName:${cluster}))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'logzioCustomerIndex',key:kubernetes.container_name,negate:!f,params:(query:k8s-events-collector),type:phrase),query:(match_phrase:(kubernetes.container_name:${service})),query:(match_phrase:(kubernetes.container_image:${container[web].image})))),index:'logzioCustomerIndex',interval:auto,query:(language:lucene,query:''),sort:!(!('@timestamp',desc)))&_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:'${timestempStart=yyyy-MM-dd'T'HH:mm:ss.SSS}',to:'${timestempStart=yyyy-MM-dd'T'HH:mm:ss.SSS}'))&discoverTab=logz-logs-tab&switchToAccountId=138828&accountIds=true url Link for the custom URL, DataDog${service}%20kube_namespace%3A${namespace}%20env%3A${cluster}&cols=core_service%2Ccore_resource_name%2Clog_duration%2Clog_http.method%2Clog_http.status_code&historicalData=true&messageDisplay=inline&sort=desc&streamTraces=true&start=${epochStart}&end=${epochEnd}&paused=true

The following values can be used to enrich the URL:

Placeholder Value Example
${epochStart} Start Time in Epoch Time
${epochEnd} End Time in Epoch Time
${service} Service Name
${namespace} Namespace Name
${cluster} Cluster Name
${container[<name>].image} Image name of a container ${container[web].image}
${timestempStart=yyyy-MM-dd'T'HH:mm:ss.SSS} Start Time in custom format* ${timestempStart=yyyy-MM-dd}
${timestempEnd=yyyy-MM-dd'T'HH:mm:ss.SSS} End Time in custom format* ${timestempEnd=yyyy-MM-dd}

*Dates can be crasfted using the display guidelines of date-fns

Full example

apiVersion: apps/v1
kind: Deployment
  name: annotation-example
  annotations: "#deploy-slack-channel" "" "" "" "" "" "" "${service}%20kube_namespace%3A${namespace}%20env%3A${cluster}&cols=core_service%2Ccore_resource_name%2Clog_duration%2Clog_http.method%2Clog_http.status_code&historicalData=true&messageDisplay=inline&sort=desc&streamTraces=true&start=${epochStart}&end=${epochEnd}&paused=true"
      run: example
  replicas: 1
        run: example
        - name: hello-world
            - containerPort: 8080
              protocol: TCP

Annotations Best Practices

In Komodor we believe that k8s annotation is the best practice for describing service metadata. This includes all of the “extra” fields used to tag and label your service, both for other team members and for external tools. BTW, We collect the data both from annotations and labels.

Where does Komodor utilize annotation?

Everywhere, Komodor will use these annotation to create a powerful connections between services and enrich service information in all of the following: * Service explorer * Related services * Events screen * Match alerts to the right services

Official kubernetes recommendation database wordpress helm

Komodor recommendation backend infrastructure "#infa-team" "#devs" redis

Usage example

  • Tagging Team annotation on relevant services and adding relevant metadata on the alert metadata in datadog.
  • Using the Team name in the alert tools (for example PD) as part of the komodor labels