Dynatrace Operator version 1.8+
Enable SQL database monitoring in Kubernetes by deploying SQL Extension Executor pods directly inside your cluster. SQL Extension Executor pods connect to your databases, run SQL-based Dynatrace extensions, and forward the collected metrics to the Dynatrace backend.
SQL database extensions run as SQL Extension Executor pods inside your Kubernetes cluster and connect to SQL databases. The databases can run inside the same cluster or be accessible remotely, such as a managed cloud database service.
The deployment consists of SQL Extension Executor pods, an Extension Execution Controller (EEC) pod, and an ActiveGate pod. SQL Extension Executor pods query your databases and collect metrics. The EEC coordinates task distribution across SQL Extension Executor pods and forwards collected data to the ActiveGate, which enriches and routes it to the Dynatrace backend. All communication is encrypted.
You can declare multiple independent executor groups using spec.extensions.databases. Each entry produces a dedicated SQL Extension Executor Deployment with its own scheduling, credential, and scaling configuration. All executor groups share the single EEC and ActiveGate pod in the deployment. Each extension monitoring configuration is attached to one executor group by specifying the group id as the executorId when creating the monitoring configuration.

extensions.read and extensions.write scopes—see Tokens and permissionsAdd spec.extensions.databases to your DynaKube. Each array entry declares one SQL monitoring deployment.
apiVersion: dynatrace.com/v1beta6kind: DynaKubemetadata:name: dynakubenamespace: dynatracespec:apiUrl: https://ENVIRONMENT_ID.live.dynatrace.com/apitokens: dynakube-tokensextensions:databases:- id: default
The id field uniquely identifies the executor group within the DynaKube. It must:
default, exec-1, pg-1, db.For AWS RDS IAM authentication, configure the SQL Extension Executor pod to authenticate using a Kubernetes ServiceAccount bound to an IAM role. No credentials need to be stored in Kubernetes.
Create a ServiceAccount with the appropriate cloud IAM annotation
The following example uses AWS IAM Roles for Service Accounts (IRSA):
apiVersion: v1kind: ServiceAccountmetadata:name: sql-executor-awsnamespace: dynatraceannotations:eks.amazonaws.com/role-arn: arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME
Reference the ServiceAccount in the databases entry
spec:extensions:databases:- id: rds-1serviceAccountName: sql-executor-aws
When serviceAccountName is set, the operator uses it instead of the default dynatrace-sql-ext-exec account for that SQL Extension Executor Deployment.
The IAM role, database user mapping, and any cloud-provider-specific configuration required to enable workload identity authentication are your responsibility. Consult your cloud provider's documentation for the setup details specific to your database service.
Both the Extension Execution Controller (EEC) and the SQL Extension Executor require a container image. You must provide both images explicitly—no automatic image resolution is available.
Extension Execution Controller image 1.345+
The EEC image is configured in spec.templates.extensionExecutionController.imageRef:
spec:templates:extensionExecutionController:imageRef:repository: public.ecr.aws/dynatrace/dynatrace-eectag: "<tag>"
SQL Extension Executor image 1.345+
The SQL Extension Executor image is configured in spec.templates.sqlExtensionExecutor.imageRef:
spec:templates:sqlExtensionExecutor:imageRef:repository: public.ecr.aws/dynatrace/dynatrace-sql-extension-executortag: "<tag>"
To use a private registry or mirror, set repository to your internal image path for each image:
spec:templates:extensionExecutionController:imageRef:repository: registry.example.com/dynatrace/dynatrace-eectag: "<tag>"sqlExtensionExecutor:imageRef:repository: registry.example.com/dynatrace/dynatrace-sql-extension-executortag: "<tag>"
After applying the DynaKube, confirm that SQL Extension Executor Deployments are running:
kubectl get deployments -n dynatrace \-l app.kubernetes.io/component=dynatrace-sql-extension-executor
Check the DatabaseDatasourcesAvailable condition on the DynaKube:
kubectl get dynakube dynakube -n dynatrace \-o jsonpath='{.status.conditions[?(@.type=="DatabaseDatasourcesAvailable")]}'
With the DynaKube configured and pods running, create monitoring configurations for your SQL extensions.
See Run SQL extensions on Kubernetes for instructions on setting up monitoring configurations.
When replicas is not set, the operator preserves the current replica count of the SQL Extension Executor Deployment, making it compatible with a Horizontal Pod Autoscaler (HPA). On initial creation, the replica count defaults to 1.
To pin the replica count and prevent HPA or manual changes from taking effect, set replicas explicitly:
spec:extensions:databases:- id: defaultreplicas: 2
Use nodeSelector, affinity, and topologySpreadConstraints to control where SQL Extension Executor pods are scheduled. These fields are set per databases[] entry.
spec:extensions:databases:- id: defaultnodeSelector:kubernetes.io/os: linuxaffinity:nodeAffinity:requiredDuringSchedulingIgnoredDuringExecution:nodeSelectorTerms:- matchExpressions:- key: node-roleoperator: Invalues:- database-tier
Tolerations apply globally to all SQL Extension Executor Deployments and are configured on spec.templates.sqlExtensionExecutor:
spec:templates:sqlExtensionExecutor:tolerations:- key: dedicatedoperator: Equalvalue: databaseeffect: NoSchedule
The default resource requests and limits for SQL Extension Executor containers are:
| CPU | Memory | |
|---|---|---|
Requests |
|
|
Limits |
|
|
Override them per databases[] entry:
spec:extensions:databases:- id: defaultresources:requests:cpu: 500mmemory: 512Milimits:cpu: "1"memory: 1Gi
For sizing recommendations based on the number of monitored endpoints, see Kubernetes resource planning.
When you deploy a custom extension signed with your own certificate, the EEC must trust that signing certificate to validate the extension. Provide the signing certificate—or its CA—as a Kubernetes Secret, then reference it in spec.templates.extensionExecutionController.customExtensionCertificates.
Create a Secret with the signing certificate
kubectl -n dynatrace create secret generic extensions-certs \--from-file=ca.pem=/path/to/ca.pem \--from-file=dev.pem=/path/to/dev.pem \--from-file=developer.pem=/path/to/developer.pem
Reference the Secret in DynaKube
spec:templates:extensionExecutionController:customExtensionCertificates: extensions-certs
The Secret must be in the same namespace as the DynaKube. You can include multiple certificate files in the Secret—the EEC imports all of them.
This field is only needed for extensions signed with a certificate that is not trusted by default. Extensions distributed from the Dynatrace Hub and signed by Dynatrace are trusted without additional configuration.
| Symptom | Cause | Resolution |
|---|---|---|
Webhook rejects with |
| Set |
CRD validation error on |
| Use a valid identifier such as |
Webhook error | A | Verify mount paths against the reserved list; ensure every |
Webhook error about an unused volume | A | Add a |
SQL Extension Executor pod fails to start on OpenShift | HostPath volume is rejected by the default SCC | Replace HostPath volumes with Secret or ConfigMap volumes (OpenShift SCC documentation) |
For runtime issues with controller and SQL Extension Executor pods—such as connectivity errors, log entries, and service account problems—see Troubleshoot SQL extensions on Kubernetes.