Kubernetes cluster access: RBAC tiers with a path to single sign-on
A proposed access model for a cluster shared through one admin kubeconfig. Per-user identities come first and OIDC groups later, with roles that never need rewriting.
Signed by the cluster CA; no extra infrastructure
Central revocation by disabling the user
Certificate group today, OIDC group tomorrow
The problem
The cluster built with the Talos runbook had a single credential: an admin client-certificate kubeconfig with full cluster-admin rights and a one-year certificate, shared by everyone who needed access. That means no individual accountability, no least privilege and no way to revoke one person without rotating access for everyone.
Options considered
| Option | For | Against |
|---|---|---|
| A. Per-user X.509 client certificates signed by the cluster CA | No extra infrastructure, works today, standard kubectl flow | Manual issuance and revocation, no central directory |
| B. OIDC through an identity provider | Central identity, SSO, instant revocation by disabling the user, group-based roles | Depends on the identity-provider work being finished first |
| C. Static token file or webhook | Simple | Discouraged upstream, no rotation story. Rejected |
Recommendation: start with A so RBAC is not blocked, but design the roles so that the binding subject is the only thing that changes when B arrives. A certificate’s O field becomes the Kubernetes group, so bindings already target groups rather than individuals, and the migration swaps certificate groups for OIDC groups without rewriting a single role.
Role tiers
| Role | Scope |
|---|---|
cluster-admin | Whole cluster. One or two people |
namespace-operator | Edit workloads in assigned app namespaces, with no RBAC or secrets escalation |
developer | Deploy their own app in their namespace, with no access to Secrets, RBAC or other namespaces |
viewer | Read-only across the cluster, excluding Secrets |
ci-deployer | Namespace-scoped edit through a ServiceAccount, for pipelines |
System namespaces stay admin-only. App namespaces follow a <team>-<env> pattern instead of default.
Rollout plan
- Collect the real user list and assign each person a tier.
- Issue per-user certificates with
CN=<user>andO=<role group>. - Keep the RBAC manifests in Git and apply them from there.
- Build one kubeconfig per user, delivered out of band. The admin kubeconfig is never reused.
- Enable API server audit logging so every request is attributable before more people get access.
- Verify each tier with positive and negative
kubectl auth can-ichecks. - Document issuance, rotation and revocation. Certificate revocation is manual, so use short-lived certificates or move to OIDC.
- Once the identity provider is ready, configure the API server for OIDC, add group subjects to the bindings and retire the certificates in favor of
kubelogin.
A companion runbook drafts the OIDC side with Authentik: groups, an OIDC provider, the API server’s authentication configuration, group bindings, kubelogin for people and ServiceAccounts for agents and CI.