Helm Chart
A community-maintained Helm chart is available for deploying Query Exporter.Helm Chart Repository
For more information and configuration options, see the Helm chart repository.Manual Deployment with YAML
You can also deploy Query Exporter using Kubernetes manifests.ConfigMap for Configuration
Create a ConfigMap to store yourconfig.yaml:
Deployment
Create a Deployment for Query Exporter:Service
Create a Service to expose the metrics endpoint:ServiceMonitor for Prometheus Operator
If using Prometheus Operator, create a ServiceMonitor:Complete Deployment Example
Using Secrets for Sensitive Data
Store database credentials in Kubernetes Secrets:Multiple Configuration Files
You can split configuration across multiple ConfigMaps:QE_CONFIG environment variable:
Scaling Considerations
- Query Exporter is typically deployed as a single replica since it maintains query state
- For high availability, consider deploying multiple instances with different sets of queries
- Use resource limits to prevent excessive resource consumption
- Monitor the built-in metrics to track query performance and errors