How to Configure MicroK8s Break Glass Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up microk8s break glass access by creating an emergency role and a separate credential file. Engineers use this backup method to log in when your main sign-in system fails. Most teams export a static admin file from the host machine and store it in a safe. This setup keeps you online, but wide roles let one bad command ruin your whole cluster. How native microk8s break glass access works MicroK8s runs as a fast, small Kubernetes setup on a single host or small group of nodes. In daily

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 microk8s break glass access by creating an emergency role and a separate credential file. Engineers use this backup method to log in when your main sign-in system fails. Most teams export a static admin file from the host machine and store it in a safe. This setup keeps you online, but wide roles let one bad command ruin your whole cluster.

How native microk8s break glass access works

MicroK8s runs as a fast, small Kubernetes setup on a single host or small group of nodes. In daily work, your team logs in through an outside identity provider to run basic tasks. When an outage hits that sign-in tool, engineers still need a way to fix the broken apps.

To prepare for this, admins generate a local client key or token tied to a high-level role. They bind this emergency user to the built-in cluster admin role inside the local role system. Then they put that static credential file into an offline password vault for safe keeping.

When a major incident starts, an on-call engineer opens the vault and pulls the backup file. The engineer loads the file on a laptop and sends commands straight to the cluster API server. When the crisis ends, the team must rotate the token and revoke the role binding by hand.

What native emergency roles solve and what they miss

Native emergency setups solve one critical problem during an outage. They let your team log in and restore service when normal identity systems go down. Without a backup path, a dead login provider locks your engineers out of the cluster.

Still, static backup files leave huge operational gaps during and after the incident. First, sharing one static admin file breaks your audit log. Every command in the log shows the same generic admin name instead of a real person.

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.

Second, Kubernetes role bindings only check who can log in at the start of a session. Once an engineer holds the admin role, the cluster trusts every command they send in flight. The native role cannot stop someone from deleting a namespace or reading secret keys by mistake. Third, rotating static keys on a host machine takes manual work after a stressful outage. Teams often forget to delete the backup role binding, leaving a permanent backdoor open.

How to tighten emergency cluster workflows

Start by dropping the single shared admin credential for emergency work. Give each on-call engineer a distinct emergency identity so logs always show who ran each command. Next, scope down your emergency roles instead of defaulting to full cluster admin rights.

Most outages only need rights to restart pods, check logs, or change app settings in specific namespaces. Build custom roles that match those exact tasks and leave out destructive delete permissions. Finally, test your emergency login flow every quarter to make sure expired keys do not block real fixes.

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

What happens if our main identity provider goes down during an incident?

Engineers cannot refresh their normal tokens when the main identity provider fails. They must switch to a local cluster token or client certificate to reach the API server.

How do we revoke a local MicroK8s credential after an outage ends?

You can delete the role binding that gives the emergency user rights inside the cluster. For full safety, you must also refresh the server certificates or tokens on the host node.

Why is the default cluster admin role risky for break glass work?

The default admin role allows every action across all namespaces without any guardrails. During a fast incident, one typo can wipe out production data or expose private app secrets.

The query runs. The emails stay hidden.