The Simplest Way to Make Kustomize and Tekton Work Like They Should
Using kustomize and tekton together lets teams build and deploy apps inside Kubernetes. Tekton runs the pipeline steps, while Kustomize patches the YAML files for each stage. This pair keeps your base files clean and free of duplicate text. Teams do not need to maintain separate copies of manifests for test and prod. Instead, a pipeline task pulls the code and builds the container image. The next task updates the image tag and applies the final output to the cluster. How kustomize and tekton
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.
Using kustomize and tekton together lets teams build and deploy apps inside Kubernetes. Tekton runs the pipeline steps, while Kustomize patches the YAML files for each stage.
This pair keeps your base files clean and free of duplicate text. Teams do not need to maintain separate copies of manifests for test and prod.
Instead, a pipeline task pulls the code and builds the container image. The next task updates the image tag and applies the final output to the cluster.
How kustomize and tekton share roles and data
Data flows between these two tools through shared disk space inside the cluster. Tekton uses a shared volume to pass files from one task to the next.
First, a git task clones your repo into this shared volume. The repo holds your base YAML files and your stage overlays.
Second, the build task creates the new app image and pushes it to a registry. That task writes the new image digest into a small text file.
Third, the Kustomize task reads the base files and the new image digest. It merges the overlay rules and writes a single manifest file to the disk.
Finally, a deploy task reads that finished file and sends it to the cluster API. This step needs a Kubernetes service account to log in and make changes.
You attach this service account to the pipeline run at the start. Each task in the run uses the permissions tied to that specific account.
Common failure modes and how to scope roles
Many teams make the mistake of using one big service account for all pipelines. They give this single account full admin rights across the whole cluster.
If a bad script runs in a build task, it can steal that wide token. The attacker can then delete workloads or read secrets from any namespace.
End-to-End Encryption + Kustomize Security Overlays: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Another common issue happens when teams store raw secrets inside their git repos. Even if Kustomize builds the secret object, anyone with repo access sees the raw key.
Unlogged cluster changes also cause headaches during an audit. When five teams share one deploy identity, you cannot tell who pushed a broken change.
You can fix this by splitting the build tasks from the deploy tasks. Run the image build with an account that only talks to the image registry.
Run the Kustomize and deploy steps with a separate, small role. Scope that Kubernetes role so it only writes to one target namespace.
Lock down the network paths for your pipeline pods as well. Build pods only need to reach your git host and your image registry.
Only the final deploy pod needs a network path to the Kubernetes API server. Keep raw keys out of git and pull them from a secret store at runtime.
Keeping manifests clean across stages
Good pipelines test the rendered YAML before sending it to the live cluster. Add a check task right after Kustomize finishes building the final file.
This check task scans the output for missing resource limits or bad labels. If the check fails, Tekton stops the run before touching the live app.
Keep your overlays small so engineers can read them fast during an outage. Only patch the values that change between test, staging, and prod.
Store the rendered output from each run in a central log bucket. When a deployment breaks, your team can compare the exact file against the last good run.
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
Does Tekton include Kustomize by default?
No, Tekton does not bundle Kustomize inside its core controller. You add a task to your pipeline that runs a container image with the tool installed.
How do I pass the new image tag to Kustomize in a pipeline?
Have your build task emit the new image tag or digest as a task result. Pass that result into the Kustomize task, which updates the manifest on the shared disk.
Should Kustomize push changes directly to the cluster or back to git?
Both patterns work well depending on your team rules. Some pipelines apply the YAML straight to the cluster, while others commit the rendered file to a deploy branch.
Related guides
In this post