Skip to main content
If you need help constructing a VQL query, navigate to the Kubernetes Efficiency Reports page and click New Report. From the top left, open the Filters menu. Create a filter and click the View as VQL button at the top of the Filters menu to see a filter’s VQL representation. You can copy this syntax to use within your API calls. You can also edit VQL directly and click Apply to update the filter.

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 the WHERE clause of a SQL query. Use ->> to select a Kubernetes label:
Use single quotes around string values.

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, like cpu.

Filter by Label

Filter based on a specific Kubernetes label, such as app, 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 using OR with multiple criteria.

Real-World Examples

Find CPU costs for production API workloads:
Find platform workloads running outside the primary region:

Troubleshooting

  • Wrap string values in single quotes, not double quotes.
  • Use kubernetes.labels->>'KEY' to filter a label; kubernetes.labels.KEY is not valid VQL.
  • Keep complete conditions together when mixing AND and OR; use parentheses to separate each branch.
  • Use the cluster, region, category, and label values shown by View as VQL.