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.
Before you begin
Section titled “Before you begin”- Prepare a kubeconfig with
cluster-adminpermissions. - Install cert-manager.
kube-configuses 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.
Download and verify the release
Section titled “Download and verify the release”Follow Releases and verification to download and verify Zeabur Identity, prepare zeabur-identityctl, and set ZEABUR_IDENTITY_IMAGE as described on that page.
Install the CRDs and manifests
Section titled “Install the CRDs and manifests”Run these commands with a kubeconfig that has cluster-admin permissions:
export ZEABUR_IDENTITY_ISSUER=https://login.example.comzeabur-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=180sThe 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.
Configure kube-apiserver authentication
Section titled “Configure kube-apiserver authentication”Choose --distro k3s or --distro generic for your cluster.
k3s and RKE2
Section titled “k3s and RKE2”Generate the configuration file:
zeabur-identityctl kube-config --distro k3s > authn.yamlThe 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.
Other clusters
Section titled “Other clusters”Generate the configuration file:
zeabur-identityctl kube-config --distro generic > authn.yamlgeneric 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.
Checks before applying
Section titled “Checks before applying”- If the cluster already has authentication settings for other Issuers, merge Zeabur Identity's
jwtentry into the existing file. Don't overwrite the entire configuration. - You can't use
--authentication-configand--oidc-*flags together. - If the authentication configuration file contains an
anonymoussection, kube-apiserver can't also use the--anonymous-authflag. Thek3soutput setsanonymous.enabled: false; you must configure anonymous access yourself forgeneric. --discovery internalis the default. If you switch to--discovery public, control plane nodes must be able to reach the public Issuer and trust its HTTPS certificate.--audiencedefaults tokubernetes, and--max-token-lifetimedefaults to1h.
Create the first admin
Section titled “Create the first admin”Generate a one-time setup link:
zeabur-identityctl setup-link --username adminOpen 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.
Verify the results
Section titled “Verify the results”Run these commands with the kubeconfig you configured:
kubectl auth whoamikubectl auth can-i '*' '*' --all-namespacesThe username should be zeabur:admin, and the permission check should return yes.
Troubleshooting
Section titled “Troubleshooting”| Symptom or result | Next action |
|---|---|
| The browser can't create a passkey | Confirm 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 restarts | Wait 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 start | Use access without Zeabur Identity to restore the previous authentication and anonymous access settings on the control plane node. |
| Users can't redeem invitation links | Confirm that the server starts with --invitations. |