How to Configure Kubernetes Break Glass Access
You set up kubernetes break glass access by binding emergency RBAC roles during an outage. After the team fixes the issue, you remove that role binding right away. Teams often keep standing admin roles active for on-call responders all day. Broad permissions leave production clusters open to mistakes and stolen keys. How native kubernetes break glass access works Kubernetes uses Role-Based Access Control to manage what users can do. Every Role or ClusterRole holds a list of rules for cluster
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 kubernetes break glass access by binding emergency RBAC roles during an outage. After the team fixes the issue, you remove that role binding right away. Teams often keep standing admin roles active for on-call responders all day. Broad permissions leave production clusters open to mistakes and stolen keys.
How native kubernetes break glass access works
Kubernetes uses Role-Based Access Control to manage what users can do. Every Role or ClusterRole holds a list of rules for cluster resources. These rules are purely additive, which means there are no deny rules. A standard Role grants permissions inside a single namespace only. A ClusterRole covers the whole cluster, including nodes and all namespaces.
To grant access, you create a RoleBinding or a ClusterRoleBinding. A RoleBinding connects a user or group to a Role in one namespace. It can also reference a ClusterRole while keeping the scope to that single namespace. A ClusterRoleBinding grants those permissions across the entire cluster at once.
During an outage, an admin or ticket tool creates a temporary binding. This binding links the on-call engineer to an emergency role. When the outage ends, the admin deletes the binding to revoke the rights. Teams also grant access to subresources like pod logs or pod exec endpoints. In RBAC rules, these subresources use a slash between the resource and the action.
What native RBAC solves and what it misses
Native RBAC controls who can call specific API endpoints on the cluster. Separating daily read roles from emergency write roles reduces daily risk. Engineers cannot delete pods or change secrets during normal shifts. They must trigger the emergency flow to get higher permissions.
Still, native RBAC only checks if a user can start an action. Once an engineer gets pod exec permissions, RBAC steps out of the way. The API server allows the shell session to start inside the container. It does not inspect the Linux commands that run inside that shell.
Break-Glass Access Procedures + Kubernetes API Server Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
The same problem happens when an emergency role grants access to read secrets. An engineer can pull database passwords or API keys in plain text. If a command prints emails, phone numbers, card numbers, or national IDs, raw data appears. Native RBAC also lacks built-in timers to delete temporary role bindings on schedule. If an admin forgets to remove the binding, the emergency access keeps the session active forever.
Securing emergency workflows in production
A safer emergency setup limits both time and command scope. Start by scoping emergency roles to one namespace with a RoleBinding. Avoid cluster-wide bindings unless the node itself fails during the incident. Next, require a peer review before any emergency privilege goes live.
Teams also need controls that work inside the session itself. Checking individual commands stops a responder from running destructive scripts by mistake. Data masking can rewrite sensitive fields like card numbers or emails in output results. This lets engineers fix broken apps while keeping secret values safe.
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 sits inline as an open-source proxy, a sidecar for your Kubernetes API, without replacing RBAC. On every production call from an engineer or AI agent, hoop.dev decides to pass, mask, block, or hold it for human approval.
First, hoop.dev guardrails refuse banned methods, paths, or headers before they run or hold risky deletes for review. 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 do you revoke emergency access in Kubernetes?
You revoke emergency access by deleting the RoleBinding or ClusterRoleBinding that granted the role. Once you delete the binding, the API server blocks new requests right away. Any active pod exec sessions may keeps the session active until you close the connection.
Should break glass roles use a RoleBinding or a ClusterRoleBinding?
Use a RoleBinding whenever the outage affects a single app or namespace. A RoleBinding can still point to a shared ClusterRole while limiting where it works. Save ClusterRoleBindings for cluster-wide incidents that involve nodes or core system parts.
Can Kubernetes RBAC block specific commands inside a pod exec session?
No, Kubernetes RBAC only controls who can open the pod exec subresource. Once the shell session starts, RBAC cannot read or block the commands typed inside. You need command-level controls to approve or block actions inside a container shell.
Related guides
In this post