How to Configure K3s SSO
You set up k3s sso by linking the cluster API server to an OpenID Connect provider. Then you map your identity provider groups to Kubernetes role bindings for your team. Most teams begin by sharing the default admin file created at cluster boot. That shared file gives every user full cluster rights with no personal audit trail. Linking an identity provider stops key sharing, but broad role mappings still leave clusters exposed. How k3s sso works with OpenID Connect A K3s server runs a lightwe
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 k3s sso by linking the cluster API server to an OpenID Connect provider. Then you map your identity provider groups to Kubernetes role bindings for your team. Most teams begin by sharing the default admin file created at cluster boot. That shared file gives every user full cluster rights with no personal audit trail. Linking an identity provider stops key sharing, but broad role mappings still leave clusters exposed.
How k3s sso works with OpenID Connect
A K3s server runs a lightweight Kubernetes API server under the hood. It does not keep its own list of human user accounts. Instead, it trusts an external OpenID Connect identity provider to check user logins. You register your cluster as a client app inside your identity provider first. The provider gives you an issuer link and a unique client identifier. You pass these settings to the K3s server startup file. You also tell the API server which token claims hold usernames and group names. When an engineer logs in, their local tool opens a browser window. The identity provider checks their password and multi-factor token. It then sends back a signed identity token to the local machine. The local tool attaches this token to every API call it makes. The K3s server checks the token signature against the provider public keys.
How role bindings map identity groups to cluster rights
Checking a login token only proves who the user is. The cluster still needs rules that state what that person can do. Kubernetes uses role-based rules to control actions on cluster objects. You create roles that list allowed actions like read, write, or delete on pods. Then you create bindings that link those roles to your identity provider group names. When a request arrives, the API server reads the group claim from the token. It checks if any binding matches that group and permits the requested action. Teams often map an engineering group straight to a cluster-wide admin role for speed. That single choice gives every developer full power to delete workloads or read secrets. Even smaller roles often grant full shell rights into running containers.
What native login setup solves and what it misses
Native single sign-on solves the problem of shared static cluster keys. When someone leaves the team, you disable their account in one central place. Their cluster tokens stop working once they expire. You also see user emails in cluster API logs instead of one generic admin name. Still, login checks and role bindings only guard the front door. They decide who can start an interactive shell or read a secret object. They cannot see or control what commands an engineer runs inside an open pod shell. Once a role grants exec rights, the cluster logs only show that a session started. Native roles also cannot mask sensitive values like emails or card numbers inside command output. Teams still face blind spots during live debugging sessions.
End-to-End Encryption + Cross-Domain SSO: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
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
Does K3s support SAML identity providers directly?
No, the Kubernetes API server inside K3s only supports OpenID Connect for external logins. If your team uses SAML, you must place an OpenID Connect bridge in front of it.
How do you revoke a user token in K3s?
Kubernetes API servers do not check token revocation lists on every single call. You should set short token lifetimes in your identity provider so access stops fast.
Why do engineers still need the cluster certificate after SSO setup?
The local client still needs the cluster public certificate to trust the API server TLS link. Single sign-on replaces the user client key, not the server trust certificate.
Related guides
In this post