The Simplest Way to Make Kustomize and Selenium Work Like They Should
Using kustomize and selenium together lets teams deploy browser test grids across different clusters. Kustomize patches cluster files without templates, while Selenium runs browser tests against your app. This pair lets teams run the same test suite in staging and production. You keep one base set of files and apply small changes per stage. How kustomize and selenium handle keys, roles, and data flow Kustomize reads a base folder of cluster manifests and applies overlays for each stage. These
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 selenium together lets teams deploy browser test grids across different clusters. Kustomize patches cluster files without templates, while Selenium runs browser tests against your app. This pair lets teams run the same test suite in staging and production. You keep one base set of files and apply small changes per stage.
How kustomize and selenium handle keys, roles, and data flow
Kustomize reads a base folder of cluster manifests and applies overlays for each stage. These overlays adjust replica counts, browser versions, and network routes for the Selenium grid. The Selenium hub receives test requests from your build pipeline and routes them to nodes. Each browser node opens the target web app, runs checks, and sends back results.
Log in keys and role rules must flow cleanly between both tools during a run. Kustomize generates secret objects and mounts them into the browser pods at start time. The cluster assigns a specific service account role to the hub and node pods. Selenium tests then read those mounted keys to log in to the test app.
Data flows from the test runner through the hub to the browser pods. The browser pods talk to your internal web app over the cluster network. When the test ends, the node sends logs and screen shots to storage. Kustomize overlays set up the storage paths and network rules for each stage.
Common failure modes and how to scope roles and network paths
Many teams store plain text test passwords inside their Git repos for Kustomize overlays. Anyone who reads the repo can take those keys and log in to apps. Another common mistake is using one shared service account for all browser nodes. If one test pod breaks, an attacker can reach every app in the cluster.
Broad tokens also cause big risks when browser pods run untrusted scripts. A wide cluster role lets a broken browser pod read secrets from other namespaces. Unlogged test runs make it hard to see which test broke a staging database. Teams often leave old browser nodes running with active keys long after tests finish.
You can fix these flaws by scoping roles and network paths in your overlays. Give each test suite its own namespace and its own narrow service account role. Use network rules in your Kustomize base to block browser pods from outside sites. Only allow traffic between the browser nodes, the hub, and the target app.
End-to-End Encryption + Kustomize Security Overlays: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Mask sensitive data in test logs so emails and card numbers do not leak. Masking rewrites matched fields in results before logs save to disk. Tear down the browser pods right after the test run finishes its check. Short pod lifetimes shrink the window for someone to steal active test keys.
Managing test grid changes across stages
Different stages need different grid sizes and browser rules to run well. Dev teams need one small browser node to check quick code changes. Staging teams need many nodes to test Chrome and Firefox at the same time. Kustomize lets you change node counts in overlays without touching the base files.
You can also swap test user accounts per stage using Kustomize secret generators. Pull fresh keys from an external store during the build step instead of Git. Map each overlay to a separate role so dev tests never touch staging data. This setup keeps your test runs fast, repeatable, and safe across every cluster.
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
Why use Kustomize instead of Helm for a Selenium grid?
Kustomize patches plain cluster files directly without adding complex template syntax. This makes it easy to change browser counts and node settings per stage. Your base files stay clean and readable for the whole team.
How should we pass login keys to Selenium test pods?
Do not store raw passwords in your Kustomize repo files. Pull keys from a secret manager during deployment and mount them as short-lived volumes. Scope each key to a single test run and revoke it after the check.
How do we stop Selenium nodes from reaching production databases?
Add strict network rules to your Kustomize base manifests. Allow browser nodes to talk only to the target web app front end. Block all direct traffic from the test namespace to database ports.
Related guides
In this post