Docs
Clusters

Get credentials for a cluster

GET
/v1/clusters/{id}/credentials

Returns a token the cluster's API server takes for an hour, with the server's address, its CA and a kubeconfig that uses them. The token signs in as you, or as the API key, in the group cloud:cluster-admins, bound to cluster-admin, when the credential holds clusters:write, and in cloud:cluster-viewers, bound to view, when it holds only clusters:read. It is for this cluster only. Every call mints a new token and is in the audit log; none is stored, and none can be revoked before it expires. A cluster that is still provisioning, with no CA yet, or terminating returns 409 invalid_state.

Authorization

headerAuthorizationBearer <cc_...>

An API key of your org, sent as Authorization: Bearer cc_.... Keys start with cc_ and are otherwise opaque. Treat a key as a password: anyone holding it can act with its scopes until it expires or is revoked. Each operation's security requirement lists the scopes it needs; an empty list means any valid key. The MCP server at /mcp accepts agent keys and no other kind.

Scope: clusters:read

Path Parameters

id*string

The cluster id.

Match^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
Length1 <= length <= 63

Header Parameters

Api-Version*string

The API version the request is written against. This document describes 2026-10-15. A missing header returns 400 api_version_required, and a version the API does not serve returns 400 unsupported_api_version.

X-Correlation-ID?string

An id of your own for this request, or for a group of requests, to find them in our logs and yours. Logged with the request and returned unchanged in X-Correlation-ID. The request id itself is always the API's own, in X-Request-ID.

Match^[A-Za-z0-9._:-]+$
Length1 <= length <= 128
Org-Context?string

Admin keys only: the id of the org to act in. Required with an admin key, together with Access-Reason; with any other credential it returns 400 invalid_request. Every request that carries it is recorded in that org's operator-access log.

Match^org-[a-z0-9]([-a-z0-9]*[a-z0-9])?$
Length5 <= length <= 63
Access-Reason?string

Admin keys only: why the operator is acting in the org, such as a support ticket. Required with Org-Context. Recorded, verbatim, in the org's operator-access log.

Match^[^\x00-\x1F\x7F]+$
Length10 <= length <= 500

Response Body

A new token for the cluster, and the kubeconfig that uses it. Not cached.

application/json
  1. response

How to reach the cluster's API server and sign in to it, for an hour.

server*string

The API server's address.

Formaturi
certificateAuthorityData*string

The PEM certificate of the CA the API server's certificate is signed by, in base64, as a kubeconfig's certificate-authority-data takes it.

Formatbyte
token*string

A bearer token for the API server. Treat it as a secret.

expiresAt*string

When the API server stops taking the token.

Formatdate-time
kubeconfig*string

A kubeconfig with the cluster, the token as its user's and a context of both, named by the cluster's id.

Example Request
curl -X GET 'https://api.cloud.confidential.ai/v1/clusters/cl-0123456789abcdef/credentials' \  -H 'Api-Version: 2026-10-15' \  -H 'X-Correlation-ID: rollout-2026-10-22' \  -H 'Access-Reason: Support ticket 4821: customer asked why i-6d3f9h2k8mzr failed'
Example Response
{  "server": "https://cl-0123456789abcdef.us-west-1.k8s.confidential.ai",  "certificateAuthorityData": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJkekNDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQVRNUkV3RHdZRFZRUURFd2hyZFdKbGNtNWwKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=",  "token": "eyJhbGciOiJFUzI1NiIsImtpZCI6ImsyMDI2MTEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FwaS5jbG91ZC5jb25maWRlbnRpYWwuYWkva3ViZXJuZXRlcyJ9.c2lnbmF0dXJl",  "expiresAt": "2026-11-05T13:00:00Z",  "kubeconfig": "apiVersion: v1\nkind: Config\nclusters:\n- cluster:\n    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJkekNDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQVRNUkV3RHdZRFZRUURFd2hyZFdKbGNtNWwKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=\n    server: https://cl-0123456789abcdef.us-west-1.k8s.confidential.ai\n  name: cl-0123456789abcdef\ncontexts:\n- context:\n    cluster: cl-0123456789abcdef\n    user: cl-0123456789abcdef\n  name: cl-0123456789abcdef\ncurrent-context: cl-0123456789abcdef\nusers:\n- name: cl-0123456789abcdef\n  user:\n    token: eyJhbGciOiJFUzI1NiIsImtpZCI6ImsyMDI2MTEiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FwaS5jbG91ZC5jb25maWRlbnRpYWwuYWkva3ViZXJuZXRlcyJ9.c2lnbmF0dXJl\n"}