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

Published
Length
3 min read

Luis Felipe Dias

All posts

You use kustomize and pulsar together to manage event streaming manifests across clusters. Kustomize patches base manifests, and Pulsar runs the distributed messaging nodes on Kubernetes. This setup lets your team run one set of base files for all stages. You apply small overlays to change disk sizes, replica counts, and security keys. Your team avoids copying large manifest files for every test and live cluster. How kustomize and pulsar handle keys, roles, and data flow Pulsar needs several

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.

You use kustomize and pulsar together to manage event streaming manifests across clusters. Kustomize patches base manifests, and Pulsar runs the distributed messaging nodes on Kubernetes.

This setup lets your team run one set of base files for all stages. You apply small overlays to change disk sizes, replica counts, and security keys. Your team avoids copying large manifest files for every test and live cluster.

How kustomize and pulsar handle keys, roles, and data flow

Pulsar needs several parts to move messages from senders to readers. It runs nodes for message routing, metadata storage, and disk storage. Kustomize organizes the manifest files for each of these parts into clean folders.

Your base folder holds the shared settings for your messaging cluster. Overlay folders hold the specific settings for dev, staging, and production. When you build the manifests, Kustomize merges the overlays into the base files.

Log in keys and role rules flow from your manifests into the cluster. You store public keys and role names in your overlay files. Pulsar reads these mounted files on startup to check client tokens. When an app sends a message, the node checks the token against the role. If the role matches the topic rule, the node writes the data.

Data also flows between the messaging nodes and the storage nodes. You use overlays to set the network paths and TLS certificates for these links. Each node checks the certificate of the other node before sending any data.

Fixing failure modes in your deployment workflow

Teams often make mistakes when they manage complex messaging clusters with overlays. A common failure mode is using one shared service account for all apps. When every app uses the same token, you cannot tell who sent bad data. If that shared token leaks, you must restart every app to fix it.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Another failure mode is giving broad tokens to your cluster admins and apps. Broad tokens let any app read or write to any topic on the cluster. One bad script can delete topics or read private data like card numbers. Unlogged admin changes also cause big problems during an outage. If an engineer changes a topic rule by hand, your git files drift.

You can fix these issues by scoping roles and network paths in your overlays. Give each app its own service account and a narrow role. Set rules so an app can only read or write to its own topics. Use network policies in your overlays to block traffic from unknown pods. Only allow your messaging nodes to talk to your storage nodes on specific ports.

Keeping cluster state and manifests in sync

Messaging clusters have state, which makes updates harder than stateless web apps. If you change a storage setting in an overlay, pods might fail to start. You must test your overlay output before you push changes to a live cluster.

Keep your storage claims separate from your stateless worker patches. Put your disk settings in a strict overlay that only senior engineers can change. Put memory limits and replica counts in a separate patch for quick updates. This split keeps your data safe while your team scales the cluster.

Always log every admin action that touches your topics, tenants, or namespaces. When you pair clean logs with strict git overlays, you avoid config drift. Your team can see who changed a rule and when they ran the command. You can also mask sensitive fields like emails or phone numbers in your logs.

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 should we store secret keys when using overlays?

Never put raw secret keys or private tokens in plain text git files. Use an external secret tool or encrypted files that manage inside the cluster. Your overlay should only point to the secret name that lives in the namespace.

Can we scale messaging nodes and storage nodes separately?

Yes, you can target each stateful set or deployment with its own patch. You can add more stateless messaging nodes during high traffic with a small patch. Your storage nodes stay at the same count without needing a restart.

How do we stop config drift on live topics?

Block direct admin changes from local laptops by locking down your cluster network. Run all topic and role updates through automated jobs or audited admin sessions. Check your live cluster state against your git files every day.

The query runs. The emails stay hidden.