Skip to content
Open Source

Install Zeabur Identity on an existing cluster

Install Zeabur Identity on an existing Kubernetes cluster, configure kube-apiserver authentication, and sign in as the first admin.

Use a cluster admin's kubeconfig to install Zeabur Identity, then configure kube-apiserver authentication. After setup, you sign in from the browser and kubectl obtains short-lived tokens.

  • Prepare a kubeconfig with cluster-admin permissions.
  • Install cert-manager. kube-config uses it to issue the internal certificate that kube-apiserver uses to reach Zeabur Identity. Without cert-manager, pass --discovery public, or the command fails.
  • Prepare a reachable HTTPS Issuer URL. Your browser must trust the URL's HTTPS certificate to create a passkey.
  • Confirm that you retain access without Zeabur Identity: an admin kubeconfig that uses client certificates, and SSH or console access to every control plane node.
  • Record how kube-apiserver currently starts and its authentication settings, and back up the configuration files. When using generic, also confirm how to restore the configuration without access to the Kubernetes API.

Follow Releases and verification to download and verify Zeabur Identity, prepare zeabur-identityctl, and set ZEABUR_IDENTITY_IMAGE as described on that page.

Run these commands with a kubeconfig that has cluster-admin permissions:

export ZEABUR_IDENTITY_ISSUER=https://login.example.com
zeabur-identityctl crds | kubectl apply --server-side -f -
zeabur-identityctl manifests --image "$ZEABUR_IDENTITY_IMAGE" --serve-arg=--invitations | kubectl apply --server-side -f -
kubectl -n zeabur-identity rollout status deploy/zeabur-identity --timeout=180s

The last command prints deployment "zeabur-identity" successfully rolled out. Replace https://login.example.com with your HTTPS Issuer URL and confirm that the URL is reachable.

--serve-arg=--invitations enables invitations. Without it, users can't redeem invitation links generated by invite.

Choose --distro k3s or --distro generic for your cluster.

Generate the configuration file:

zeabur-identityctl kube-config --distro k3s > authn.yaml

The command prints installation steps. Follow the output to install the configuration, then restart k3s or rke2-server once. When you make valid changes to authn.yaml afterward, kube-apiserver reloads the file within about a minute.

On RKE2, create /etc/rancher/rke2/zeabur-identity/ and save authn.yaml there on every server before you restart rke2-server. RKE2 mounts only files that exist.

Generate the configuration file:

zeabur-identityctl kube-config --distro generic > authn.yaml

generic outputs only the authentication configuration file. Pass the file to --authentication-config according to how your cluster starts kube-apiserver. For managed Kubernetes clusters, use an authentication configuration method that your provider supports.

  • If the cluster already has authentication settings for other Issuers, merge Zeabur Identity's jwt entry into the existing file. Don't overwrite the entire configuration.
  • You can't use --authentication-config and --oidc-* flags together.
  • If the authentication configuration file contains an anonymous section, kube-apiserver can't also use the --anonymous-auth flag. The k3s output sets anonymous.enabled: false; you must configure anonymous access yourself for generic.
  • --discovery internal is the default. If you switch to --discovery public, control plane nodes must be able to reach the public Issuer and trust its HTTPS certificate.
  • --audience defaults to kubernetes, and --max-token-lifetime defaults to 1h.

Generate a one-time setup link:

zeabur-identityctl setup-link --username admin

Open the link in a browser and select Create passkey, or Use a password to set a password and an authenticator app. Then check that the admin has a sign-in method. The output lists one Credential with admin in the USER column:

kubectl -n zeabur-identity get credentials

--username defaults to admin, and --valid-for defaults to 60m.

Register the kubectl client and configure kubeconfig

Section titled “Register the kubectl client and configure kubeconfig”

Follow steps 6 through 8 in Install and sign in on k3s to register the kubectl client, configure kubeconfig on your computer, and sign in with the admin account you created.

Run these commands with the kubeconfig you configured:

kubectl auth whoami
kubectl auth can-i '*' '*' --all-namespaces

The username should be zeabur:admin, and the permission check should return yes.

Symptom or resultNext action
The browser can't create a passkeyConfirm that the Issuer URL is reachable and that your browser trusts its HTTPS certificate.
Sign-in returns oidc: authenticator not initialized just after kube-apiserver restartsWait a few minutes for kube-apiserver to retrieve Zeabur Identity's keys. If the failure persists, check the kube-apiserver logs, the zeabur-identity Service's endpoints, and the internal certificate. Don't disable certificate verification.
kube-apiserver won't startUse access without Zeabur Identity to restore the previous authentication and anonymous access settings on the control plane node.
Users can't redeem invitation linksConfirm that the server starts with --invitations.