NewCompare CPU & GPU pricing across AWS, Azure & GCP
Read Operator

Configuration

Configure the zxporter operator -- collection frequency, namespace filtering, GPU monitoring, and all available options.

Configuration

The Read Operator is configured via a CollectionPolicy CRD and environment variables set during installation. Most defaults work well for typical clusters.

Configuration Reference

Prop

Type

Namespace Filtering

By default, the operator collects from all namespaces. You can customize this:

Exclude specific namespaces:

# Via CollectionPolicy CRD
kubectl patch collectionpolicy default -n devzero-system --type merge -p '{
  "spec": {"excludedNamespaces": ["kube-system", "monitoring", "istio-system"]}
}'

Only collect from specific namespaces (allowlist):

kubectl patch collectionpolicy default -n devzero-system --type merge -p '{
  "spec": {"targetNamespaces": ["production", "staging"]}
}'

When targetNamespaces is set, excludedNamespaces is ignored.

Collection Frequency

The default 10-second interval provides high-resolution data. For large clusters (500+ nodes), consider increasing it:

kubectl patch collectionpolicy default -n devzero-system --type merge -p '{
  "spec": {"collectionFrequency": "30s"}
}'

Reducing sampling rates will affect the efficiency and accuracy of recommendations.

GPU Monitoring

GPU metrics require the NVIDIA DCGM Exporter or GPU Operator to be running in your cluster. See the Quickstart GPU section for setup instructions.

If your cluster doesn't have GPUs, disable GPU metric collection to avoid unnecessary scrape errors:

kubectl patch collectionpolicy default -n devzero-system --type merge -p '{
  "spec": {"disableGpuMetrics": true}
}'

Environment Variables

You can keep container environment variables inside your cluster. This setting is available in zxporter 0.1.29 and later. Set zxporter.envVarCollection to disabled:

helm upgrade zxporter oci://registry-1.docker.io/devzeroinc/zxporter \
  --namespace devzero-system \
  --reset-then-reuse-values \
  --set zxporter.envVarCollection=disabled

--reset-then-reuse-values keeps your existing overrides and picks up defaults added in newer chart versions. It needs Helm 3.14 or later.

If you installed with kubectl apply, upgrade to 0.1.29 or later, then set the ENV_VAR_COLLECTION key in the zxporter ConfigMap:

kubectl patch configmap devzero-zxporter-env-config -n devzero-system --type merge -p '{
  "data": {"ENV_VAR_COLLECTION": "disabled"}
}'

zxporter picks up the change without a pod restart, usually within a minute or two.

With the setting disabled, zxporter removes env, envFrom, and related environment variable fields from pods, workloads, and custom resources such as Spark applications before sending them. Your cluster objects don't change, and recommendations work as before. zxporter also resends every object, so data DevZero already holds is updated to match.

The default is enabled. Any value other than enabled or disabled is treated as disabled.

Alternative Image Registries

By default, DevZero uses Docker Hub to host images. To use ECR instead, change devzeroinc to public.ecr.aws/devzeroinc:

docker pull public.ecr.aws/devzeroinc/zxporter

When using Helm charts:

helm upgrade ... --set image.repository=public.ecr.aws/devzeroinc

Admission Policies

On a cluster whose admission controller requires site-specific labels — an OPA Gatekeeper K8sRequiredLabels constraint, for example — the install is rejected unless every object carries them. The zxporter chart and its bundled zxporter-nodemon subchart accept commonLabels, commonAnnotations, podLabels, and podAnnotations for this:

helm upgrade ... --set global.commonLabels.cost_center=platform

Use global rather than a chart-local value so the labels also reach the bundled node agent. See Installing Under an Admission Policy for the full behaviour.

On this page