How to Configure OpenShift Multi Tenant
You set up an openshift multi tenant cluster by giving each team a separate namespace. Then you bind role rules to limit what each team can read or write. Most platform teams start with shared clusters to save money and reduce toil. They group apps by team or project inside distinct namespaces. Still, broad permissions can break isolation across the cluster. If a role is too wide, one team might read another team's secrets. A bad rule can also let a user change live pods in the wrong namespace.
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 an openshift multi tenant cluster by giving each team a separate namespace. Then you bind role rules to limit what each team can read or write. Most platform teams start with shared clusters to save money and reduce toil. They group apps by team or project inside distinct namespaces. Still, broad permissions can break isolation across the cluster. If a role is too wide, one team might read another team's secrets. A bad rule can also let a user change live pods in the wrong namespace.
How openshift multi tenant role rules work
Cluster isolation relies on built-in role-based access control rules. In this model, a Role or a ClusterRole holds a set of permissions. These rules are purely additive, which means there are no deny rules. You always start with zero permissions and add only what a team needs. A standard Role always sets permissions inside one single namespace. In contrast, a ClusterRole is not tied to a single namespace. It can cover cluster-wide items like nodes, or resources across all namespaces.
Once you define roles, you must link them to users or groups. A RoleBinding grants permissions inside one specific namespace. You can point a RoleBinding to a Role in that same namespace. You can also point a RoleBinding to a shared ClusterRole. This trick lets admins write one standard developer role and reuse it per team. Each team gets that role bound only to their own namespace. In contrast, a ClusterRoleBinding grants access across the entire cluster at once. You should avoid cluster-wide bindings for normal tenant users.
Controlling pod logs and shell commands
Tenant rules must also cover subresources like pod logs and shell sessions. The API server names resources by how they appear in the request path. When a user reads logs or runs a shell inside a pod, that uses a subresource. You must grant permissions for these subresources explicitly in your role rules. If you only allow reading pods, the user still cannot open a shell. Platform admins often split viewing roles from shell roles to reduce risk.
What native cluster isolation leaves open
Native role bindings do a great job of deciding who can enter a namespace. They stop a user on Team A from touching pods owned by Team B. Yet these rules only check the initial API call at the door. Once a user gets shell permissions to a pod, the cluster stops checking. The native role system does not inspect what commands run inside that shell. It also cannot rewrite sensitive fields like emails or card numbers in log output.
Multi-Factor Authentication (MFA) + OpenShift RBAC: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
This gap creates risk when developers fix live issues in shared clusters. A user with pod shell rights can run any command inside that container. They might read local files, pull secrets from memory, or query an internal store. Standard cluster logs show that someone opened a shell session on a pod. They do not show the exact commands typed or the data returned. Platform teams need command-level control and data masking to keep tenant workloads safe.
Check Kubernetes API requests and responses on the wire
Kubernetes RBAC decides who may call the API server. RBAC does not check response payloads or split listing Secret names from reading Secret values when a role grants get access. With hoop.dev, you run an open-source proxy, a sidecar for your Kubernetes API, inline on the API connection. On every kubectl or API call an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.
On each call, hoop.dev guardrails read the method, normalized path, and headers to refuse bad deletes or full Secret reads with a 403 error, or hold risky calls for approval. On the way back, hoop.dev data masking walks JSON responses by key and masks matched values in Secrets, ConfigMaps, and pod logs in memory. View the project on GitHub.
Frequently asked questions
Can I write a deny rule to block one specific action in a namespace?
No, role permissions in the cluster are purely additive and include no deny rules. To block an action, you must remove the rule that grants it and build up smaller roles.
Should I use a RoleBinding or a ClusterRoleBinding for tenant teams?
Always use a RoleBinding for tenant teams so their permissions stay inside their assigned namespace. A ClusterRoleBinding gives permissions across all namespaces and breaks tenant isolation.
How do I let a team view pods without letting them run shell commands?
Grant read permissions on the base pod resource and the pod log subresource only. Leave out permissions for the pod exec subresource so users cannot start a shell.
Related guides
In this post