How to Configure MicroK8s SSO

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up microk8s sso by linking the cluster API server to an identity provider. Then you map provider groups to cluster roles so users log in with their own accounts. Most teams start by sharing one static admin file across the whole group. That shared file makes it impossible to track who ran a bad command. When roles are too broad, any user can delete workloads or read secret keys. How microk8s sso works in practice A standard MicroK8s install uses a local token file to let admins log in

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 sso by linking the cluster API server to an identity provider. Then you map provider groups to cluster roles so users log in with their own accounts. Most teams start by sharing one static admin file across the whole group. That shared file makes it impossible to track who ran a bad command. When roles are too broad, any user can delete workloads or read secret keys.

How microk8s sso works in practice

A standard MicroK8s install uses a local token file to let admins log in. That default file gives full control over every part of the cluster. To use single sign-on, you link the API server to an OpenID Connect provider. Your team logs into the identity provider first to get a signed token. The local client tool sends that token to the cluster with each request.

The API server checks the digital signature against the identity provider key URL. It reads the user email and group claims inside the verified token. Next, role bindings inside the cluster match those group claims to specific permissions. A developer group might get read rights in one namespace and nothing else. An ops group might get write rights across all namespaces for daily tasks. You never have to pass static client keys around in chat rooms again.

What native single sign-on solves and where it stops

Native single sign-on stops teams from sharing one master admin key across laptops. When someone leaves the company, you disable their account in the identity provider. Their access to the cluster stops once their current token expires. You also see user emails in the API audit log instead of one generic admin name. This setup solves the basic problem of proving who is at the keyboard.

Still, native cluster login only checks identity at the start of a request. Once a user has a role, that role stays active all day long. If a developer can run a shell inside a pod, they can read local files. The cluster does not inspect what happens inside that open shell session. Also, role rules are hard to write at a fine level of detail.

Teams often give out broad edit roles just to keep daily work moving. A broad edit role lets a user read cluster secrets or drop a live pod. Native login decides who gets inside the cluster, not what each command does in flight. It cannot block a bad command inside a pod shell or mask private data. If a pod log prints customer emails or phone numbers, anyone with log rights sees them.

End-to-End Encryption + Cross-Domain SSO: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Why cluster role management gets messy at scale

Managing OpenID Connect flags on every single node takes constant care from your team. When you run many small clusters at the edge, keeping server args in sync is tough. One wrong text edit on the API server can lock out the whole team. You also have to set up local login plugins on every engineer laptop.

Each developer must install a helper tool to fetch and refresh tokens during the day. When tokens fail to refresh, engineers waste hours trying to fix their local config files. Even with all this work, you still lack a single log of interactive pod sessions. Security teams want to see every command run inside a container and block risky actions.

Add request guardrails and response masking beside Kubernetes

Cluster roles and service accounts govern who reaches the Kubernetes API. Still, a broad role or agent can delete workloads or print sensitive values from ConfigMaps and logs. In practice, hoop.dev sits inline beside the API server as a sidecar for your Kubernetes API. For every production API call an agent or human sends, hoop.dev decides whether to pass, mask, block, or escalate it for review alongside RBAC.

With hoop.dev Kubernetes controls, guardrails allow listing Secret names while refusing reads of Secret data before execution, and data masking redacts matched keys in returned JSON responses and log streams in memory. Furthermore, hoop.dev holds SOC 2 Type II and is MIT licensed on GitHub.

Frequently asked questions

Does MicroK8s support single sign-on out of the box?

Yes, MicroK8s uses the standard Kubernetes API server under the hood. You can point the API server to any OpenID Connect provider to check user tokens.

What happens if the identity provider goes down?

Users with expired tokens will not be able to log in until the provider returns. Admins can still use local node access to fix the cluster during an outage.

Can native cluster roles hide private data in pod logs?

No, native cluster roles only allow or block access to the whole log stream. They cannot rewrite matched fields like card numbers or national IDs inside the log output.

The query runs. The emails stay hidden.