How to Configure AKS Break Glass Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up aks break glass access by binding emergency user accounts to cluster roles. These backup roles let engineers log in and fix outages when normal sign-in fails. Most teams create a standing admin group or hand out emergency cluster credentials. When emergency roles are too wide, one bad command can break the whole cluster. How aks break glass access works with Kubernetes RBAC In Kubernetes, role-based rules control what an emergency user can do after logging in. A Role or ClusterRole

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 aks break glass access by binding emergency user accounts to cluster roles. These backup roles let engineers log in and fix outages when normal sign-in fails. Most teams create a standing admin group or hand out emergency cluster credentials. When emergency roles are too wide, one bad command can break the whole cluster.

How aks break glass access works with Kubernetes RBAC

In Kubernetes, role-based rules control what an emergency user can do after logging in. A Role or ClusterRole holds rules that represent a set of permissions. These permissions are purely additive, which means there are no deny rules in RBAC. You must list every allowed action when you build your emergency role.

A Role always sets permissions within one single namespace. In contrast, a ClusterRole is not tied to one namespace. It can cover cluster-scoped resources like nodes or namespaced resources across all namespaces. It can also cover non-resource endpoints on the API server.

To connect a backup identity to these rules, you create a binding. A RoleBinding grants permissions within a specific namespace. It can point to a Role in that namespace or a ClusterRole. A ClusterRoleBinding grants permissions across the entire cluster at once.

During an outage, responders often need to read pod logs or run container commands. Kubernetes RBAC refers to resources by the exact name in the API URL. Features like pod logs and command execution are subresources written with a slash. When you grant emergency shell rights, you must include these subresources in the role.

What native emergency roles solve and what they miss

Native Kubernetes bindings solve the initial login problem during an identity outage. They let you map a backup group or emergency account to cluster permissions ahead of time. When your primary login system goes down, responders can still reach the API server. You can scope these bindings to specific namespaces so engineers only touch broken apps.

Still, native role bindings only decide who can log in and call an API. Once a responder gets pod exec rights, RBAC stops checking their work. The API server authorizes the start of the shell session, not the commands inside it. An engineer in a rush can delete files, change state, or read secret values.

Break-Glass Access Procedures + Customer Support Access to Production: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Standing emergency credentials also create a tracking gap for security teams. If two responders share one break glass admin key, the cluster audit log shows one name. You cannot tell which person ran a specific command inside a pod. Also, Kubernetes RBAC has no built-in timer to revoke a binding when the fire is out. If someone forgets to remove the binding, the emergency account keeps the session active for attackers.

Scoping emergency roles for safer incident response

Start by splitting your emergency roles into two separate tiers. Create a read-only role first so responders can check pod status and read logs. Many outages only need log inspection and a rollout restart to fix the issue. Keep pod exec and secret read rules in a second, stricter role.

Use a RoleBinding instead of a ClusterRoleBinding whenever the outage affects one app. Even if you reference a shared ClusterRole, a RoleBinding keeps the user inside one namespace. Review your bindings after every incident to make sure no temporary rules remain active.

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

Can I add a deny rule to block secret reads during break glass sessions?

No, Kubernetes RBAC permissions are purely additive and do not support deny rules. To block secret reads, you must omit the secret resource from the role rules.

Should I use a RoleBinding or ClusterRoleBinding for aks break glass access?

Use a RoleBinding if the emergency only impacts workloads inside one specific namespace. Save ClusterRoleBindings for whole-cluster failures where responders must inspect nodes or all namespaces.

Why can an emergency user view pods but fail to open a shell?

Viewing a pod and running a shell use different resources in the Kubernetes API. Your role must grant access to the exec subresource on pods, not just the pod resource.

The query runs. The emails stay hidden.