The Simplest Way to Make Cohesity and Kustomize Work Like They Should
Teams pair cohesity and kustomize to back up apps across many clusters. Kustomize stamps out cluster files, and Cohesity reads those files to protect data. This workflow stops manual backup mistakes. Platform teams set up base rules once in Git. Then each stage gets the right backup tags and storage classes on every deploy. How cohesity and kustomize share roles and data Kustomize alters base Kubernetes manifests for dev, test, and prod clusters. It adds labels, namespaces, and storage rules
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 pair cohesity and kustomize to back up apps across many clusters. Kustomize stamps out cluster files, and Cohesity reads those files to protect data.
This workflow stops manual backup mistakes. Platform teams set up base rules once in Git. Then each stage gets the right backup tags and storage classes on every deploy.
How cohesity and kustomize share roles and data
Kustomize alters base Kubernetes manifests for dev, test, and prod clusters. It adds labels, namespaces, and storage rules without copying whole files. Cohesity runs an agent inside the cluster to find and snapshot those resources.
Data flows from your Git repo to the cluster API. Your deploy tool runs Kustomize and sends the final manifests to the cluster. Cohesity watches the cluster API for namespaces and labels that match its backup jobs.
When a match appears, the backup agent talks to the storage driver. It takes a snapshot of the volume and saves the app state. It then moves that copy to your backup storage target.
Log in and role checks happen at two distinct points. First, the deploy runner needs a role to write manifests into the cluster. Second, the backup agent needs a cluster role to read specs and create snapshots.
Common failure modes and how to scope roles
A common failure happens when an overlay drops a backup label. Kustomize patches can overwrite labels if teams are not careful. If the label disappears, Cohesity skips that app during the next backup run.
Another issue comes from broad service accounts. Teams often give the backup agent full cluster admin rights to save time. If someone steals that token, they can read every secret in the cluster.
End-to-End Encryption + Kustomize Security Overlays: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Shared API keys between the cluster and the backup server also cause trouble. When five clusters use one static key, you cannot trace who changed a backup job. You also cannot rotate that key without breaking all five clusters at once.
Fix this by scoping roles down to the exact verbs needed. Give the backup agent read rights on pods and write rights only on snapshots. Use separate service accounts for each cluster so every action has a clear owner.
Lock down network paths between the cluster and the backup storage. Allow traffic only from known cluster nodes to the backup target port. Block regular app pods from talking to the backup network at all.
Testing backup tags before you deploy
Catch missing backup tags before your manifests ever reach the cluster. Run a check in your build pipeline after Kustomize builds the final output. Make the build fail if a stateful app lacks a backup label.
Test restores in a scratch namespace every month. Use a test overlay to change the target namespace and storage volume names. This proves your snapshots work and keeps prod data safe during the test.
Keep secret values out of your Git overlays. Store backup keys in an external secret store and load them at run time. Also check that your data masking tools rewrite emails and card numbers in test restores.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
How does Kustomize tell Cohesity which apps to back up?
Kustomize adds common labels to your app manifests during the build step. Cohesity scans the cluster for those exact labels and adds matching apps to its backup job.
What happens if a Kustomize overlay changes a storage class?
The new storage class must support volume snapshots in your cluster. If the driver lacks snapshot support, the backup job will fail when it tries to copy the volume.
How do we test a restore without overwriting prod apps?
Create a separate Kustomize overlay that sets a new namespace and new resource names. Point the restore job to that test namespace so live prod traffic stays untouched.
Related guides
In this post