Last updated: May 29, 2026
Manage Views as Code
Views are Dash0 assets that can be versioned and managed as infrastructure as code. This approach enables version control, automated deployment pipelines, consistent configuration across environments, and code review for view changes.
Dash0 Operator for Kubernetes
Define views as Dash0View custom resources that sync to Dash0, enabling workflows and native Kubernetes management.
Example
1234567891011121314151617181920apiVersion: operator.dash0.com/v1alpha1kind: Dash0Viewmetadata:name: error-logsnamespace: monitoringspec:type: logsdisplay:name: Error Logsdescription: All error-level logs from production servicesgroupBy:- service.name- k8s.pod.namefilter:- key: severityoperator: equalsvalue: ERROR- key: k8s.namespace.nameoperator: equalsvalue: production
The Dash0 Operator for Kubernetes watches for Dash0View resources in namespaces with a Dash0 monitoring resource deployed. When it detects changes:
- New view resources are created as views in Dash0
- Modified resources update the corresponding views
- Deleted resources remove the corresponding views
Apply and Manage
1234567891011121314# Apply the viewkubectl apply -f view.yaml# List all viewskubectl get dash0views -n monitoring# View detailskubectl describe dash0view error-logs -n monitoring# Update the viewkubectl edit dash0view error-logs -n monitoring# Delete the viewkubectl delete dash0view error-logs -n monitoring
For more information, refer to the Dash0 Operator for Kubernetes documentation.
Dash0 Terraform Provider
Manage views in your Terraform infrastructure alongside other cloud resources for unified infrastructure management.
Example Usage
123456789101112131415161718192021222324252627282930313233343536terraform {required_providers {dash0 = {source = "dash0hq/dash0"version = "~> 1.0"}}}provider "dash0" {url = "https://api.dash0.com"auth_token = "auth_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}resource "dash0_view" "error_logs" {dataset = "production"view_yaml = <<-EOTkind: Dash0Viewmetadata:name: error-logsspec:type: logsdisplay:name: Error Logsdescription: All error-level logs from production servicesgroupBy:- service.namefilter:- key: severityoperator: equalsvalue: ERROR- key: k8s.namespace.nameoperator: equalsvalue: productionEOT}
For more information, see the Dash0 Terraform provider documentation.
Dash0 CLI
Script view operations with the Dash0 CLI for automated deployments and batch operations.
Create from File
12# Create a view from a YAML filedash0 views create --dataset production -f error-logs.yaml
List Views
12# List all views in a datasetdash0 views list --dataset production
Get View Details
12345# Get a single view as YAMLdash0 views get --dataset production <id> -o yaml# Get view details in JSON formatdash0 views get --dataset production <id> -o json
Update View
12# Update an existing viewdash0 views update --dataset production <id> -f error-logs-updated.yaml
Delete View
12# Delete a viewdash0 views delete --dataset production <id>
For more information, see the Dash0 CLI documentation.
Further Reading
- Manage Dashboards as Code — Define and manage dashboards using infrastructure as code.
- Manage Check Rules as Code — Define and manage check rules using infrastructure as code.
- Manage Spam Filters as Code — Define and manage spam filters using infrastructure as code.