Overview
The CoreWeave Kubernetes Service (CKS) unmanaged authentication endpoint accepts Kubernetes-native auth methods such as OpenID Connect (OIDC) tokens, Service Account tokens, and webhook-validated tokens. Use this endpoint when you need authentication methods that the managed CKS endpoint doesn’t support, such as integrating with an external identity provider or authenticating CI/CD pipelines withServiceAccount tokens. Its URL format is:
api. prefix to the apiServerEndpoint value
for your cluster. For example, if your apiServerEndpoint is:
apiServerEndpoint for your cluster in the Overview section
of the cluster’s details in the Cloud Console, or in the apiServerEndpoint
field under the JSON tab of the cluster details.
The unmanaged authentication endpoint doesn’t support the API access tokens in the
kubeconfig files downloaded from the Cloud Console. You must use one of
the authentication methods described in Authentication methods.Authentication methods
The unmanaged authentication endpoint supports three methods:- OIDC access tokens: Authenticate using an external identity provider such as Google, Okta, or Microsoft Entra. Kubernetes validates the token against the configured issuer. See OIDC authentication.
- Service Account tokens: Authenticate using a Kubernetes
ServiceAccounttoken. This is the recommended pattern for CI/CD pipelines and automation. See Service account authentication. - Webhook authentication: Authenticate using a custom webhook that implements the Kubernetes TokenReview API.
OIDC authentication
This section walks through configuring a CKS cluster to trust an external OIDC provider, then connectingkubectl to the unmanaged endpoint using the
kubelogin plugin.
Prerequisites
Before you begin, make sure you have:- A CKS cluster and a CoreWeave API access token with permission to read and update that cluster.
- Administrative access to an OIDC identity provider (such as Google, Okta, or Microsoft Entra).
- The following CLI tools installed:
kubectl,kubelogin,curl, andjq.
kubelogin with:
kubeconfig for the cluster to create the initial
role-based access control (RBAC) binding for your OIDC identity.
Step 1: Register an OIDC application with your identity provider
Create an OIDC application in your identity provider and collect the following values:- Issuer URL: The base URL of the OIDC discovery document (for example,
https://accounts.google.comfor Google orhttps://login.microsoftonline.com/[TENANT-ID]/v2.0for Microsoft Entra). - Client ID: The identifier assigned to your application.
- Client secret: The secret used by
kubeloginto request tokens.
http://localhost:8000 as an authorized
redirect URI. kubelogin uses this URI for the local browser
authentication flow.
Step 2: Configure OIDC on the cluster
Export your CoreWeave API access token and the OIDC values you collected:id and version (both are required in the PATCH
body):
id, version, and apiServerEndpoint values for your cluster.
Configure OIDC trust by sending a PATCH request to the cluster:
PATCH body:
idandversionare required in thePATCHbody.updateMaskmust list the specific fields being updated.usernameClaimis the token claim that Kubernetes uses as the username in RBAC. Usingemailproduces recognizable usernames likealice@example.com.
oidc block and include them in updateMask:
Step 3: Verify the OIDC configuration
After thePATCH request, the cluster may briefly enter an updating state. Wait
until the cluster status returns to running and the oidc block is present:
Step 4: Create an RBAC binding for the OIDC user
Configuring OIDC grants authentication. It doesn’t grant any Kubernetes permissions. You must create an RBAC binding before the user can perform any actions. Using an existing adminkubeconfig, create a binding for the OIDC identity:
--user value must exactly match the claim value that Kubernetes reads from
the OIDC token. Because usernameClaim: email was configured in Step 2, the
subject here is the user’s email address.
For production environments, use a narrower role than cluster-admin. If your
provider exposes group claims, you can bind RBAC to a group instead:
Step 5: Configure a kubectl context with kubelogin
Create akubectl context that points to the unmanaged CKS endpoint and uses
kubelogin to obtain OIDC tokens.
Set variables for the unmanaged API endpoint and OIDC credentials:
kubelogin:
The
--oidc-extra-scope=email argument is required for providers such as Google
OAuth where the email claim is not included in the default token scope. For
other providers, check which scopes are required to include the claim you
configured as usernameClaim.api. prefix is required. Without it, kubectl connects to the managed
CKS endpoint, which doesn’t accept OIDC tokens.
Step 6: Test authentication
Run a Kubernetes API request to confirm the setup works:kubelogin opens a browser window and redirects you through your provider’s
login flow. After you authenticate, kubectl receives the ID token and retries
the request. You should see your cluster’s Nodes listed.
Service account authentication
KubernetesServiceAccount tokens are the recommended authentication method for
CI/CD pipelines and automation that need to access the CKS API. The unmanaged
endpoint accepts these tokens directly, unlike the managed auth endpoint, which
only supports CoreWeave API access tokens.
Create a ServiceAccount in the namespace used by your automation:
--duration flag controls how long the token is valid.
Without it, the token expires at the cluster’s default (typically one hour),
which is too short for most CI use cases:
kubeconfig that uses the token and the unmanaged endpoint:
ServiceAccount the permissions it needs using standard Kubernetes RBAC:
kubeconfig securely (for example, in a GitHub Actions secret
or a secrets manager) and use it in your CI/CD workflows.