Managing Kubernetes users with client certificates

Client certificates authenticate many Kubernetes users by default, but they cannot be revoked once issued and expire on a fixed schedule. This page explains the risks, the migration path to OIDC and how to keep a controlled break-glass credential.

On this page

Why client certificate users are hard to manage in Kubernetes

Client certificates are hard to manage in Kubernetes because the cluster does not keep a list of its users. Kubernetes does not store normal users as API objects. It accepts any credential that a trusted certificate authority signed, and it reads the identity from the certificate itself: the common name becomes the username and the organization field becomes the group. That means you cannot list, disable or remove a person through the API server the way you would in a directory. If a laptop is lost or an engineer leaves, a certificate issued at install time keeps working until it expires. Check the validity period of each certificate with openssl x509 -noout -enddate and record it, because that date sets how long a departed user can still reach the cluster.

The Kubernetes authentication documentation lists four methods: X.509 client certificates, bearer tokens (including OpenID Connect and JWT tokens), webhook token authentication and an authenticating proxy. Only the OIDC, webhook and proxy methods hand the decision to a system that can disable an account immediately. X.509 certificates are verified against the cluster CA, and Kubernetes offers no built-in way to revoke one certificate before its expiry. The usual response to a compromised key is rotating the CA, which breaks every user at once. Plan for that cost before an incident forces the decision, and confirm the current revocation behavior for your Kubernetes version in the vendor or project documentation.

Move people off certificates when you need offboarding that takes effect on the day it happens, group membership managed in your identity provider, audit trails tied to a named person, or one login shared across several clusters. Keep one certificate-based administrator credential for break-glass access, stored under controls your security team has approved, and use it only when the identity provider is unavailable. Before you change anything, inventory every kubeconfig file and every certificate subject that holds cluster-admin rights. Then confirm which API server authentication settings your distribution allows you to change, because the OIDC setup depends on them.

Which risks come from certificate-based access

Kubernetes does not store users as API objects, so a client certificate is the user's identity and its permissions. The risks below share one root: once a certificate is issued, the cluster has little control over it until it expires or the CA is changed, and that gap shapes how you plan access, rotation and audit.

No revocation for issued certificates

A client certificate signed by the cluster CA stays valid until its expiry date, and the API server does not check a revocation list for it. If an engineer leaves or a laptop is lost, the certificate keeps working until it expires. Check which certificates exist, who holds them, and whether your offboarding process has any step that removes cluster access for certificate holders. Treat this as a gap to close with short lifetimes or a move to OIDC, not as something a process document fixes.

Kubernetes authentication docs

Expiry that causes outages

Certificates created by kubeadm for the control plane and admin access have a fixed lifetime of one year. When that date passes without renewal, the affected components or client logins fail at once, often on a weekend or during a change freeze nobody remembered. Record the expiry date of every certificate in your inventory, alert well before it, and confirm that your team has a tested renewal procedure for each control plane node.

kubeadm certificate lifetime
1 year

admin.conf copied to laptops

The admin kubeconfig that kubeadm writes on the first control plane node carries full cluster-admin rights through the system:masters group. In many teams it is copied to laptops, CI runners and shared drives so that anyone can run kubectl quickly. Find every copy you can, confirm who can read each one, and replace routine use with named user certificates that have scoped RBAC bindings.

Groups fixed until reissue

Group membership in a client certificate is written into the certificate's organization field when it is signed. Moving an engineer from one team to another does not change their existing certificate, so old group rights remain until a new certificate is issued and the old one is no longer used. Ask who owns the process for reissuing certificates after role changes, and test that a removed group actually loses access.

Weak audit attribution

When several people share one certificate or kubeconfig, audit log entries show the same user name for every action, so you cannot tell who deleted a namespace or changed a secret. Enable audit logging on the API server and check whether entries for admin activity map to a single person. Shared credentials also make it hard to meet access review requirements, because the reviewer cannot attest to individual activity.

CA key handling

Every client certificate is only as trustworthy as the cluster CA private key that signs it. If that key is stored on a shared admin node, copied into backups without encryption, or readable by more people than need it, anyone holding it can mint a certificate for any user and group. Confirm where the CA key lives, who can read it, how it is backed up, and whether signing happens only on controlled hosts.

Which authentication method fits each user group

Engineers who run kubectl every day are the group most likely to be on client certificates today, and the group that gains most from moving to OpenID Connect (OIDC). Kubernetes does not store normal users as API objects, so identity comes from whichever authenticator the API server trusts. OIDC, delivered as a bearer token issued by your identity provider, lets you remove access by disabling an account or removing a group membership, instead of waiting for a certificate to expire. The API server can be configured through the --oidc flags or, on newer versions, through an AuthenticationConfiguration file, which supports multiple issuers.

  • Revocation works through the identity provider: disabling a user or removing them from a group stops new tokens, and short token lifetimes limit the window for existing ones.
  • Group claims drive RBAC: map groups from the identity provider to RoleBindings so access changes are made in one system.
  • Workstation tooling is required: engineers need a kubeconfig that obtains tokens, usually through a credential plugin such as kubelogin, which adds setup and support work.
  • Identity provider availability matters: if the provider is down, people cannot log in, so plan for it as a dependency.

Before you cut over, confirm which authentication configuration your Kubernetes version and distribution support, and test group claims with a non-production user.

Options for moving users off client certificates

This table compares the main ways to replace certificate-based user access with federated login, and what each one changes for users and administrators. Read each row against your identity provider, your number of clusters and whether you can change API server flags. The main takeaway is that moving to OIDC is usually the first step, while a break-glass certificate stays in place regardless of the option you choose.

OptionWhen it fitsWhat it changes for usersWhat to confirm
Single OIDC issuer through API server flagsOne identity provider, a small number of clusters, and control of kube-apiserver flagsUsers log in through the corporate identity provider and receive short-lived tokens instead of long-lived client certificatesWhether your managed or distribution control plane lets you set OIDC flags, and how group claims map to RBAC subjects
AuthenticationConfiguration with multiple issuersSeveral JWT issuers, such as a workforce directory plus a partner or contractor issuer, on clusters where you can change the API server configurationUsers from more than one issuer sign in with one kubeconfig flow, with claim validation and mapping rules applied per issuerYour Kubernetes version supports the structured configuration file, how configuration reloads are handled, and whether anonymous access must be restricted
Dex as a login brokerEngineers authenticate with LDAP or Active Directory, or you need a connector layer in front of an upstream identity providerEngineers log in with corporate accounts and a kubelogin-style client, while Dex issues tokens to the clusterWhether Dex can run highly available in your environment, how group claims reach RBAC, and who owns connector configuration
Pinniped as a multi-cluster brokerMany clusters need one login experience, and some clusters cannot have their API server flags changedOne Supervisor-based login path distributes kubeconfig entries to users across clustersThe clusters you need to reach, whether Concierge can run on each one, and how kubeconfig distribution will be managed
Webhook token authenticationYou already run an internal token review service that must decide who a bearer token belongs toUsers present tokens that an external service validates, so the API server no longer checks identity itselfOwnership and availability of the webhook service, its failure behavior, and how it is audited and monitored
Certificates kept for break-glass onlyEvery cluster needs an emergency path that works when the identity provider or broker is downDay-to-day users no longer receive certificates, and one tightly controlled credential remains for recoveryWhere the admin credential is stored, who can retrieve it, how use is logged and alerted, and how it is rotated after use

How to migrate users to OIDC and keep a break-glass credential

This sequence moves named people off shared and long-lived client certificates onto OIDC-backed identity, with group-based RBAC and a tightly controlled emergency credential. Each step ends with a check so you can confirm the move worked before the next one starts.

  1. Inventory every certificate and kubeconfig in use

    List every client certificate, kubeconfig file and service account token that can reach the API server, including copies of admin.conf on laptops, CI runners and jump hosts. Record who holds each one, its subject (CN and O fields), its expiry date and the RBAC bindings tied to it. Ask your kubeadm operators to confirm where admin.conf was copied and whether any copies have been shared. The step is done when you have a complete table that a second engineer has reviewed and no credential is unaccounted for.

  2. Choose the identity provider and group claims

    Decide which identity provider will issue tokens, such as an existing corporate OIDC provider or a self-managed one, and confirm that it can emit a stable user identifier and a groups claim. Agree on the group names that will map to cluster roles, and keep them separate from the names used for application access. Confirm with your identity team how group membership is removed when someone leaves. The step is done when the provider, the claim names and the group list are written down and approved by the security owner.

  3. Configure the API server to trust the issuer

    Configure kube-apiserver to accept tokens from the chosen issuer, setting the issuer URL, client ID, username claim and groups claim, either through the older OIDC flags or an AuthenticationConfiguration file if your Kubernetes version supports it. Confirm the exact option names and supported versions against the Kubernetes authentication documentation for your release before editing manifests. Restart or reload the API server on one control plane node first. The step is done when the API server starts cleanly and the issuer's signing keys are reachable from every control plane node.

  4. Map groups to RBAC bindings

    Create ClusterRoleBindings or RoleBindings that grant the mapped groups only the permissions they need, starting from read-only or namespace-scoped roles rather than cluster-admin. Avoid wildcard verbs and resources, and check that no group can create bindings or escalate privileges. Use kubectl auth can-i with the --as and --as-group flags to test each binding before any user relies on it. The step is done when the test matrix shows each group has exactly the intended permissions and nothing more.

  5. Test login with a non-admin pilot group

    Pick a small pilot group of engineers with restricted roles and have them authenticate through the OIDC provider using a kubelogin-style plugin on their workstations. Each pilot user should run a basic read command and confirm that a write outside their namespace is denied. Check the API server audit log for the login requests and confirm the username and groups recorded match the identity provider. The step is done when every pilot user can log in, the denials are recorded, and the audit entries show the expected identity.

  6. Move users and remove shared admin copies

    Roll the OIDC login out to the remaining users in waves, issuing each person a kubeconfig that uses the identity plugin instead of a certificate. Once a group is migrated, remove its personal client certificates from the RBAC bindings and delete any copies of admin.conf or other shared admin credentials from workstations, CI systems and shared drives. Confirm the removal with the owners of those systems. The step is done when no routine human access uses a client certificate and the audit log shows only OIDC identities for day-to-day work.

  7. Create and store the break-glass credential

    Create one emergency credential, typically a client certificate bound to a dedicated group with cluster-admin rights, and keep it out of daily use. Store the private key in an offline or access-controlled vault that requires two named approvers to retrieve, and record the certificate expiry so it is renewed on a planned schedule. Confirm that the group is not bound to any routine workflow or automation. The step is done when the credential is stored, its custody is recorded, and a test of the emergency path has been logged without using it for normal work.

  8. Document the break-glass use procedure

    Write a short procedure that states when the break-glass credential may be used, who must approve it, how the use is recorded in the ticketing system and how the credential is rotated afterward. Include the exact commands to locate the audit entries for that identity and to confirm the group membership being used. Have the security owner and the on-call lead sign off, and run one tabletop exercise to confirm the steps work. The step is done when the signed procedure exists, the exercise is recorded and any gaps found are fixed.

How an OIDC login and a break-glass certificate reach the API server

The diagram starts with an engineer signing in to an OIDC issuer, which returns a token that the kubectl client presents to kube-apiserver. The API server validates the token, then applies RBAC to decide what the user may do. A separate break-glass path uses a client certificate kept offline and presented directly to the API server. The dashed boundary marks where trust moves from the identity provider to the cluster. Check that the issuer is trusted by the API server and that the break-glass certificate maps to a tightly limited role.

Normal OIDC access and offline break-glass access both enter through kube-apiserver.

Security and operational controls for the break-glass path

A break-glass credential is the one identity that still works when OIDC, the identity provider or kubeconfig distribution fails, so it carries the most risk in the cluster. The controls below keep it out of daily use, make every use visible, and make sure it still works when someone needs it.

Store the credential offline

Keep the break-glass client certificate and its private key in an offline or sealed store that only named custodians can reach, such as an encrypted volume in a physical safe or a hardware token. Do not place it in a shared password manager vault, a CI variable or a file on a workstation. Ask the team who holds each copy, where every copy lives, and how a custodian's departure is handled. Its validity period was set at issuance, so record the expiry date alongside the stored copy.

Require dual control for each use

Make any use of the break-glass identity need two people: one who requests access and one who approves and witnesses it. Record the incident or change ticket that justifies the use before the credential is retrieved. Two-person handling prevents a single administrator from quietly using the path to bypass the identity provider. Confirm that the procedure works at night and on weekends, when the people who normally approve may not be reachable.

Alert on every use through audit logs

Configure the API server audit policy so that authentication and requests made by the break-glass identity are logged at a level that shows the subject, verb, resource and source address. Forward those events to a system outside the cluster and create an alert on any request from the identity's subject, such as one that uses system:masters group membership. Test the alert by performing a supervised, non-destructive use and confirming that the security team receives it.

Rotate the credential after each use

Treat every use as a compromise event for that credential. After the emergency is closed, issue a new client certificate under the cluster CA, distribute it to the custodians, and revoke the old identity by removing its group bindings or by rotating the CA if the design allows it. Certificates cannot be revoked individually in the default Kubernetes model, so the practical revocation step is to remove access through RBAC and to replace the credential. Document the steps in the runbook.

Keep system:masters narrow

The system:masters group grants unrestricted access and bypasses RBAC checks, so the only certificate that should carry it is the break-glass one. Remove the group from any other client certificate issued during the migration, and check that OIDC group claims cannot map users into system:masters. Review ClusterRoleBinding objects that reference cluster-admin and confirm that no everyday engineer appears in them. The RBAC design topic covers the broader role model.

Authentication docs

Retire admin.conf and protect the CA key

Remove admin.conf copies from laptops, shared jump hosts and build servers once OIDC access works, because each copy is a long-lived cluster-admin credential. Keep the cluster CA private key on the control plane nodes or in an offline location with restricted access, since anyone holding it can issue a client certificate for any group. Run a periodic test that restores access through the break-glass path in a non-production cluster, and record the result. Ask your vendor or distribution which control plane paths hold the CA key and how it is backed up.

What do teams ask before moving Kubernetes users off certificates?

How much effort does moving Kubernetes users off client certificates take?

The effort depends mostly on how many users, groups and clusters are involved and on how ready your identity provider is. Three factors drive it:

  • The number of clusters and access paths, including kubeconfig files on laptops, admin workstations and CI runners.
  • Whether groups in your identity provider already match the roles people need, or whether RBAC bindings must be redesigned first.
  • How many clusters must accept a changed API server authentication setting, and how each change is tested and approved.

The work is one-time for the cutover, then recurs as new users, groups and clusters are added. Ask any provider for a quote that lists clusters, user counts, group structure and the number of kubeconfig distributions, so the scope can be compared line by line.

Can our own platform team move users to OIDC without a partner?

Yes, a team with cluster administration skills and administrative access to the identity provider can do the migration, and the Kubernetes authentication documentation covers the supported mechanisms. The work usually includes creating an OIDC client, setting API server authentication options, mapping claims to groups, binding RBAC roles, rolling out kubeconfig changes and testing login for each role. The main risk is the cutover itself. A wrong issuer URL, audience or claim mapping can lock out every administrator at once, so the team needs a tested break-glass path and someone who owns the identity provider. If those are in place, an in-house team can handle a small, single-cluster estate. Larger estates benefit from a second pair of hands during testing.

What do we need to provide for an outside engagement?

An implementation partner needs a short list of access and decisions before work starts. Expect to provide:

  • Administrative access to the identity provider, so client applications and group claims can be created and tested.
  • Cluster administrator access on each cluster, plus access to the control plane nodes where API server settings live.
  • An inventory of current certificate users, their roles and the pipelines that use certificate-based kubeconfig files.
  • A change window for each cluster and a named approver for production changes.
  • An owner for user communication, who will send the new login steps and confirm the cutover date.

The written scope should state exactly which of these the partner will do and which your team will perform.

How long does the migration take, and what drives duration?

Duration is not fixed by the technology. It is set by the scope and by how quickly decisions and changes can be made. The main drivers are the number of clusters, how ready the identity provider is, how many groups must be mapped to RBAC roles, the number of users who must re-login and update kubeconfig files, and how long your change approval cycle takes. Pipelines that still use certificates add testing time. For a fixed-scope engagement, the timeline is agreed in writing before work starts, so ask for a schedule that lists each cluster, each approval gate and the rollback point. Confirm the timeline against your own change calendar and your planned Kubernetes upgrades.

How should we handle the break-glass credential during the switch?

Keep one tightly controlled administrative credential that works even when the identity provider is down. On kubeadm clusters, the admin kubeconfig carries a client certificate in the system:masters group, which grants full cluster access and bypasses RBAC, so it should be used only as break-glass access. Store it in a secrets vault with access logging, limit who can retrieve it, test that it works before cutover, and rotate or replace it after any use. Document the steps for using it, and review access to it on a regular schedule. Do not remove it until OIDC login has been proven for every cluster administrator.

What happens to client certificates users already hold?

Kubernetes does not keep a revocation list for client certificates it has issued, so a certificate remains usable until it expires unless its access is removed. Kubeadm issues client certificates with a one-year lifetime by default, so existing certificates may stay valid for months after you move users to OIDC. Remove the RBAC bindings for each certificate subject as soon as its owner has migrated, and remove the certificate from kubeconfig files. Renewing or replacing the cluster CA invalidates every certificate it issued, which is a larger operation with its own cutover. Confirm the current behavior for your Kubernetes version in the authentication documentation before you plan the timeline.

When should we bring in outside help for this migration?

Outside help is most useful when no one clearly owns the identity provider, when several clusters must change together, when audit evidence for access changes is required, or when a lockout during cutover would be costly. DeployOpen plans, implements, hardens and documents self-hosted Kubernetes inside your own infrastructure. Its engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and a quote follows from that written scope. DeployOpen does not publish a price list. Plan the work alongside your upgrade calendar, since the Kubernetes release page lists 1.35 end of life on February 28, 2027, 1.36 on June 28, 2027 and 1.37 on October 28, 2027.

Official Kubernetes sources to read next

Read the Kubernetes authentication reference before you choose any client certificate design, because it sets out the authenticators the API server supports: X.509 client certificates, bearer tokens including OpenID Connect and JWT, webhook token authentication and authenticating proxies. Kubernetes does not store normal users as API objects, so whatever identity scheme you adopt is defined by the certificate subject or token claims your API server accepts. Use the Kubernetes authentication docs to confirm which of these your kube-apiserver version supports and how it maps the system:masters group and the CN and O fields of a certificate to a username and groups. Check those mappings against your current cluster before you change anything.

Next, read the Good practices for Kubernetes Secrets page, because the kubeconfig files that carry client certificates and bearer tokens are themselves sensitive material. Kubernetes stores Secrets unencrypted in etcd by default, so confirm that encryption at rest is configured and that your RBAC limits list and watch access on Secrets in kube-system. Also check where your team keeps copies of admin.conf and per-user kubeconfigs. The page is short, and it gives the reviewer a concrete basis for the controls you will document when you move people to OIDC while keeping a break-glass credential.

How DeployOpen scopes and delivers Kubernetes access migrations

DeployOpen plans and delivers the move from certificate-based Kubernetes users to OIDC-backed login inside infrastructure you control. The work starts with an inventory of who holds certificates and admin.conf copies, then builds the identity integration, RBAC mapping and break-glass path in a fixed written scope.

How we scope

  • The written scope lists every cluster, identity source and user group included in the access migration.
  • Scope covers an inventory of issued client certificates, admin.conf copies and service accounts in use.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before any work begins.

How we build

  • We configure the OIDC issuer settings and group claim mapping against your existing identity provider.
  • We map identity groups to least-privilege RBAC roles and keep system:masters limited to the break-glass account.
  • We test login, denial, group changes and break-glass access on a non-production cluster before cutover.

How we hand over

  • You receive the configuration, RBAC bindings, runbooks and the sealed break-glass credential procedure.
  • Documentation explains how to revoke access, rotate break-glass credentials and review bindings over time.
  • Verification evidence shows which certificate paths were closed, which remain and why, for your compliance records.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Retainers can cover certificate renewal checks, RBAC reviews and changes when identity groups shift.
  • Ask us to confirm the support scope, response expectations and retest terms in the written quote.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.