Kubernetes Efficiency Reports VQL Schema
VQL for Kubernetes Efficiency Reports comprises one namespace,kubernetes, which represents the available filters on Kubernetes Efficiency Reports in the Vantage console. To reference a filter, use the following syntax: namespace.field (e.g., kubernetes.category). The following fields are available within the kubernetes namespace.
Keywords
VQL includes a set of keywords to create complex filter conditions. These keywords function similar to their SQL equivalents.
With these operators and keywords, you can construct complex filter conditions in VQL.
Syntax
VQL resembles theWHERE clause of a SQL query. Use ->> to select a Kubernetes label:
VQL Examples
The following examples cover common use cases for VQL.Multiple Namespaces
Filter for one or the other namespace.Results from a List of Clusters
Filter for a list of different clusters.Costs by Category
Costs for a specific category, likecpu.
Filter by Label
Filter based on a specific Kubernetes label, such asapp, with the value rollouts-demo.
Filter by Pod
Filter for a specific pod.Filter by Region
Filter for clusters in multiple regions.Multiple Filters
Complex filter that shows combining two different statements usingOR with multiple criteria.
Real-World Examples
Find CPU costs for production API workloads:Troubleshooting
- Wrap string values in single quotes, not double quotes.
- Use
kubernetes.labels->>'KEY'to filter a label;kubernetes.labels.KEYis not valid VQL. - Keep complete conditions together when mixing
ANDandOR; use parentheses to separate each branch. - Use the cluster, region, category, and label values shown by View as VQL.