Flux EKS
You set up a flux eks workflow by installing controllers that sync Git repos to clusters. These controllers watch your code and apply changes to your Kubernetes namespaces on a schedule. Most teams start by giving the sync controllers broad cluster permissions to deploy any app. When teams share these broad roles with engineers, one mistake can break live workloads. How flux eks works with Kubernetes RBAC In a flux eks setup, controllers run inside the cluster and talk to the API server. Kube
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 set up a flux eks workflow by installing controllers that sync Git repos to clusters. These controllers watch your code and apply changes to your Kubernetes namespaces on a schedule. Most teams start by giving the sync controllers broad cluster permissions to deploy any app. When teams share these broad roles with engineers, one mistake can break live workloads.
How flux eks works with Kubernetes RBAC
In a flux eks setup, controllers run inside the cluster and talk to the API server. Kubernetes uses Role-Based Access Control to decide what those controllers and your engineers can do. A Role holds a set of rules that grant permissions within a single namespace. A ClusterRole is not tied to one namespace and covers resources across the whole cluster. It can also cover cluster-scoped resources like nodes or non-resource endpoints.
To grant these permissions, you link a role to a user or service account. A RoleBinding grants permissions inside one namespace by referencing a Role or a ClusterRole. A ClusterRoleBinding grants permissions across the entire cluster at once. In Kubernetes, all permissions are additive, which means there are no deny rules at all. You must start with zero permissions and add only the exact rules a team needs.
Multi-tenant teams often restrict each sync controller to a single namespace using a RoleBinding. This stops an app team from changing cluster nodes or reading secrets in other namespaces. Engineers also need permissions to check why a deployment failed or why a pod crashed. Kubernetes represents these actions as subresources in the API URL, such as pod logs. You write the subresource with a slash in your role rules to allow log reading.
What native roles solve and what they leave open
Native roles and Git sync rules solve the problem of how changes enter the cluster. Your code repo holds the desired state, and the controller applies it without manual steps. RoleBindings keep teams inside their own namespaces and stop them from changing global cluster settings. This setup works well when every deployment succeeds and no one needs live cluster access.
The gap appears when a release fails and an engineer must debug a live pod. Native RBAC decides who can log in and reach the pod exec subresource. Once the session starts, RBAC cannot inspect or filter the shell commands run inside it. If a role allows secret reading or database queries during debugging, raw data flows out. Native rules cannot rewrite sensitive fields like emails, phone numbers, card numbers, or national IDs. Teams also lack a clear record of every shell command run during an emergency fix.
EKS Access Management + Flux Security: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Scoping day-two operations in managed clusters
To keep clusters safe during live debugging, teams must separate deployment sync from human access. Let the Git controllers handle all standard writes using scoped service accounts in each namespace. Give human engineers read-only roles for daily checks so they can view pod status safely. When an engineer needs to run commands in a pod, require a separate approval flow.
Keep emergency roles narrow and remove them as soon as the fix is complete. You should also review your RoleBindings often to make sure old permissions do not linger. Because Kubernetes has no deny rules, a single forgotten ClusterRoleBinding will override your careful namespace limits. Combining strict Git sync with controlled human sessions keeps your cluster safe during fast releases.
Govern kubectl and API calls in flight
Identity providers and Kubernetes RBAC decide who logs into a cluster. They cannot redact keys inside returned JSON objects or hold a risky delete call for review. By design, hoop.dev runs as an open-source proxy, a sidecar for your Kubernetes API, checking requests and responses without replacing RBAC.
First, hoop.dev guardrails refuse banned methods, paths, or headers before they run. Next, hoop.dev data masking rewrites sensitive keys in returned Secret, ConfigMap, and log responses in memory, and writes each decision to the audit trail. Explore the repo on GitHub.
Frequently asked questions
How should we scope controller permissions in a multi-tenant cluster?
Use a RoleBinding in each tenant namespace instead of a single ClusterRoleBinding for everything. This limits each sync controller so it only manages resources inside its assigned namespace.
Can we add a deny rule to block access to one specific secret?
No, Kubernetes RBAC permissions are purely additive and do not support deny rules. To block access, you must remove the broad rule and grant access to specific items.
Why do engineers still need cluster access when using Git sync?
Git sync handles deployments, but engineers still need to read pod logs and check crashes. When logs are not enough, they sometimes need live shell sessions to inspect running containers.
Related guides
In this post