Dapr Kubernetes pod annotations spec

The available annotations available when configuring Dapr in your Kubernetes environment

The following table shows all the supported pod Spec annotations supported by Dapr.

AnnotationDescription
dapr.io/enabledSetting this paramater to true injects the Dapr sidecar into the pod
dapr.io/app-portThis parameter tells Dapr which port your application is listening on
dapr.io/app-idThe unique ID of the application. Used for service discovery, state encapsulation and the pub/sub consumer ID
dapr.io/log-levelSets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info
dapr.io/configTells Dapr which Configuration CRD to use
dapr.io/log-as-jsonSetting this parameter to true outputs logs in JSON format. Default is false
dapr.io/enable-profilingSetting this paramater to true starts the Dapr profiling server on port 7777. Default is false
dapr.io/api-token-secretTells Dapr which Kubernetes secret to use for token based API authentication. By default this is not set.
dapr.io/app-protocolTells Dapr which protocol your application is using. Valid options are http and grpc. Default is http
dapr.io/app-max-concurrencyLimit the concurrency of your application. A valid value is any number larger than 0
dapr.io/app-sslTells Dapr to invoke the app over an insecure SSL connection. Applies to both HTTP and gRPC. Traffic between your app and the Dapr sidecar is encrypted with a certificate issued by a non-trusted certificate authority, which is considered insecure. Default is false.
dapr.io/metrics-portSets the port for the sidecar metrics server. Default is 9090
dapr.io/sidecar-cpu-limitMaximum amount of CPU that the Dapr sidecar can use. See valid values here. By default this is not set
dapr.io/sidecar-memory-limitMaximum amount of Memory that the Dapr sidecar can use. See valid values here. By default this is not set
dapr.io/sidecar-cpu-requestAmount of CPU that the Dapr sidecar requests. See valid values here. By default this is not set
dapr.io/sidecar-memory-requestAmount of Memory that the Dapr sidecar requests .See valid values here. By default this is not set
dapr.io/sidecar-liveness-probe-delay-secondsNumber of seconds after the sidecar container has started before liveness probe is initiated. Read more here. Default is 3
dapr.io/sidecar-liveness-probe-timeout-secondsNumber of seconds after which the sidecar liveness probe times out. Read more here. Default is 3
dapr.io/sidecar-liveness-probe-period-secondsHow often (in seconds) to perform the sidecar liveness probe. Read more here. Default is 6
dapr.io/sidecar-liveness-probe-thresholdWhen the sidecar liveness probe fails, Kubernetes will try N times before giving up. In this case, the Pod will be marked Unhealthy. Read more about failureThreshold here. Default is 3
dapr.io/sidecar-readiness-probe-delay-secondsNumber of seconds after the sidecar container has started before readiness probe is initiated. Read more here. Default is 3
dapr.io/sidecar-readiness-probe-timeout-secondsNumber of seconds after which the sidecar readiness probe times out. Read more here. Default is 3
dapr.io/sidecar-readiness-probe-period-secondsHow often (in seconds) to perform the sidecar readiness probe. Read more here. Default is 6
dapr.io/sidecar-readiness-probe-thresholdWhen the sidecar readiness probe fails, Kubernetes will try N times before giving up. In this case, the Pod will be marked Unready. Read more about failureThreshold here. Default is 3
dapr.io/http-max-request-sizeIncreasing max size of request body http and grpc servers parameter in MB to handle uploading of big files. Default is 4 MB
dapr.io/envList of environment variable to be injected into the sidecar. Strings consisting of key=value pairs separated by a comma.

Last modified May 26, 2021: Update to point to 1.2 (#1518) (c690379)