The Simplest Way to Make Dynatrace and Kustomize Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use dynatrace and kustomize together to deploy monitoring agents across Kubernetes clusters. Kustomize patches cluster manifests with stage details while Dynatrace collects telemetry from those workloads. This pairing lets platform teams manage one base manifest for every single cluster. You apply small overlays for dev, staging, and prod without copying whole files. How dynatrace and kustomize handle permissions and data flow Kustomize reads your base files and merges them with stage

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use dynatrace and kustomize together to deploy monitoring agents across Kubernetes clusters. Kustomize patches cluster manifests with stage details while Dynatrace collects telemetry from those workloads.

This pairing lets platform teams manage one base manifest for every single cluster. You apply small overlays for dev, staging, and prod without copying whole files.

How dynatrace and kustomize handle permissions and data flow

Kustomize reads your base files and merges them with stage overlays before deployment. Your deploy pipeline then sends the final manifests to the Kubernetes API server.

Once the pods start, the Dynatrace operator runs inside the cluster namespace. It uses an API key and a data ingest token to talk home.

The operator watches new pods and injects monitoring code into your running apps. Next, the agent sends metrics, logs, and traces back to the Dynatrace backend.

Kustomize never talks to the monitoring backend on its own during this flow. Instead, it builds the resource files that tell the operator how to act.

You store cluster labels, host groups, and routing rules inside your overlay files. This setup keeps your base templates clean and easy for anyone to read.

Common failure modes and how to scope roles

Many teams put raw API keys right into their Kustomize overlay files. That mistake leaks secrets into Git history where any developer can read them.

Another common problem is using one broad token for every single cluster. If an attacker steals that key, they can fake data for all stages.

Shared service accounts also make it hard to track who changed a deployment. When someone runs a manual patch, the cluster log only shows a shared role.

End-to-End Encryption + Kustomize Security Overlays: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix this, give each cluster its own scoped ingest key and role. Set up the key so it can only write data, not read settings.

Keep raw keys out of Git by using an external secret store tool. Kustomize should only reference the secret name, not the secret value itself.

Lock down network paths so agents only talk to your known ingest endpoints. Block outbound traffic from the agent namespace to any other external web hosts.

Also, limit which team members can edit the base operator files in Git. Let app teams change their own overlay tags while platform teams guard the base.

Managing manifest drift across clusters

Drift happens when engineers run manual commands against a live cluster during incidents. Those quick fixes bypass Git and break the rules set in your overlays.

The next time your pipeline runs, it might wipe out that manual fix. Worse, a broken manual edit can stop agents from sending alerts during outages.

Teams prevent drift by turning off direct write roles for regular user accounts. Let your automated deploy tool apply the Kustomize output on every single merge.

When engineers must check live pods, give them read roles for that namespace. You should also mask sensitive fields like emails or card numbers in logs. Masking rewrites matched fields in results so raw values stay safe during checks.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Should we put Dynatrace API tokens in Kustomize bases?

No, never put raw tokens in base files or overlays in Git. Reference an existing Kubernetes secret name and load the value from a secret store.

How do we separate dev and prod data in Dynatrace using Kustomize?

Use separate Kustomize overlays for dev and prod to set unique host groups. Give each overlay a reference to a stage-specific token for clean data separation.

What permissions does the deploy pipeline need for these manifests?

The deploy role needs rights to create and update resources in the agent namespace. It also needs permission to read the cluster secret references during the run.

The query runs. The emails stay hidden.