CKS API Reference
Users with an access token can interact with the CKS API using curl or any other HTTP client. The API allows users to create, list, update and delete CKS clusters.
- The API server is
https://api.coreweave.com. - Replace
{API_ACCESS_TOKEN}in the examples below with your CoreWeave API access token.
Reference table
| Endpoint | Method | Description |
|---|---|---|
/v1beta1/cks/clusters | GET | List all clusters. |
/v1beta1/cks/clusters | POST | Create a cluster. |
/v1beta1/cks/clusters/{id} | GET | Get a cluster's information by ID. |
/v1beta1/cks/clusters/{id} | DELETE | Delete a cluster by ID. |
/v1beta1/cks/clusters/{id} | PATCH | Update a cluster's configuration by ID. |
Clusters
To list or create CKS clusters, use the /v1beta1/cks/clusters endpoint. The API supports the GET and POST methods.
GET /v1beta1/cks/clusters
To list all CKS clusters, use the GET method with the /v1beta1/cks/clusters endpoint.
$curl -X GET https://api.coreweave.com/v1beta1/cks/clusters \-H "Content-Type: application/json" \-H "Authorization: Bearer {API_ACCESS_TOKEN}"
A successful response returns an array of CKS cluster objects. The fields returned are:
{"items": [{"id": string,"name": string,"zone": string,"vpcId": string,"public": boolean,"version": string,"network": {"podCidrName": string,"serviceCidrName": string,"internalLbCidrNames": Array of strings},"oidc": {"issuerUrl": string,"clientId": string,"usernameClaim": string,"usernamePrefix": string,"groupsClaim": string,"groupsPrefix": string,"ca": string,"requiredClaim": string,"signingAlgorithms": Array of integers <enum> [ items <enum > ],},"authzWebhook": {"server": string,"ca": string},"authnWebhook": {"server": string,"ca": string},"auditPolicy": string,"status": integer <enum>,"apiServerEndpoint": string,"createdAt": string <date-time>,"updatedAt": string <date-time>}]}
POST /v1beta1/cks/clusters
To create a CKS cluster, use the POST method with the /v1beta1/cks/clusters endpoint.
The cluster configuration must be supplied as a JSON object in the request body. The following fields are required in the request:
namezonevpcIdpublicversionnetwork.podCidrNamenetwork.serviceCidrNamenetwork.internalLbCidrNamesoidc.issuerUrloidc.clientIdauthzWebhook.serverauthnWebhook.server
- Create a VPC before creating a cluster, and supply the
vpcIdin the cluster configuration. - The cluster
idshould not be supplied in the request body; it is assigned and returned in the response.
The supported fields and their data types are as follows.
{"name": string,"zone": string,"vpcId": string,"public": boolean,"version": string,"network": {"podCidrName": string,"serviceCidrName": string,"internalLbCidrNames": Array of strings},"oidc": {"issuerUrl": string,"clientId": string,"usernameClaim": string,"usernamePrefix": string,"groupsClaim": string,"groupsPrefix": string,"ca": string,"requiredClaim": string,"signingAlgorithms": Array of integers <enum> [ items <enum > ],},"authzWebhook": {"server": string,"ca": string},"authnWebhook": {"server": string,"ca": string},"auditPolicy": string}
Submit the request, passing the JSON object in the body as data.json.
$curl -X POST https://api.coreweave.com/v1beta1/cks/clusters \-H "Content-Type: application/json" \-H "Authorization: Bearer {API_ACCESS_TOKEN}" \-d @data.json
A successful response returns a cluster object, with the newly-assigned id.
{"cluster": {"id": string,"name": string,"zone": string,"vpcId": string,"public": boolean,"version": string,"network": {"podCidrName": string,"serviceCidrName": string,"internalLbCidrNames": Array of strings},"oidc": {"issuerUrl": string,"clientId": string,"usernameClaim": string,"usernamePrefix": string,"groupsClaim": string,"groupsPrefix": string,"ca": string,"requiredClaim": string,"signingAlgorithms": Array of integers <enum> [ items <enum > ],},"authzWebhook": {"server": string,"ca": string},"authnWebhook": {"server": string,"ca": string},"auditPolicy": string,"status": integer <enum>,"apiServerEndpoint": string,"createdAt": string <date-time>,"updatedAt": string <date-time>}}
Cluster by ID
To retrieve, update, or delete a CKS cluster by ID, use the /v1beta1/cks/clusters/{id} endpoint. The API supports the GET, PATCH, and DELETE methods.
GET /v1beta1/cks/clusters/{id}
To get information about a CKS cluster, use the GET method with the /v1beta1/cks/clusters/{id} endpoint. Substitute {id} with the cluster ID.
$curl -X GET https://api.coreweave.com/v1beta1/cks/clusters/{id} \-H "Content-Type: application/json" \-H "Authorization: Bearer {API_ACCESS_TOKEN}"
A successful response returns the cluster object.
{"cluster": {"id": string,"name": string,"zone": string,"vpcId": string,"public": boolean,"version": string,"network": {"podCidrName": string,"serviceCidrName": string,"internalLbCidrNames": Array of strings},"oidc": {"issuerUrl": string,"clientId": string,"usernameClaim": string,"usernamePrefix": string,"groupsClaim": string,"groupsPrefix": string,"ca": string,"requiredClaim": string,"signingAlgorithms": Array of integers <enum> [ items <enum > ],},"authzWebhook": {"server": string,"ca": string},"authnWebhook": {"server": string,"ca": string},"auditPolicy": string,"status": integer <enum>,"apiServerEndpoint": string,"createdAt": string <date-time>,"updatedAt": string <date-time>}}
DELETE /v1beta1/cks/clusters/{id}
To delete a CKS cluster, use the DELETE method with the /v1beta1/cks/clusters/{id} endpoint. Substitute {id} with the cluster ID.
$curl -X DELETE https://api.coreweave.com/v1beta1/cks/clusters/{id} \-H "Content-Type: application/json" \-H "Authorization: Bearer {API_ACCESS_TOKEN}"
A successful response returns the deleted cluster object.
{"cluster": {"id": string,"name": string,"zone": string,"vpcId": string,"public": boolean,"version": string,"network": {"podCidrName": string,"serviceCidrName": string,"internalLbCidrNames": Array of strings},"oidc": {"issuerUrl": string,"clientId": string,"usernameClaim": string,"usernamePrefix": string,"groupsClaim": string,"groupsPrefix": string,"ca": string,"requiredClaim": string,"signingAlgorithms": Array of integers <enum> [ items <enum > ],},"authzWebhook": {"server": string,"ca": string},"authnWebhook": {"server": string,"ca": string},"auditPolicy": string,"status": integer <enum>,"apiServerEndpoint": string,"createdAt": string <date-time>,"updatedAt": string <date-time>}}
PATCH /v1beta1/cks/clusters/{id}
To perform a partial update of a CKS cluster's configuration, use the PATCH method with the /v1beta1/cks/clusters/{id} endpoint. Substitute {id} with the cluster ID. This method uses a field mask, provided in the updateMask field, to specify which fields to modify. For more information on field masks, see the Google AIP guidance.
The cluster configuration must be supplied as a JSON object in the request body. The following fields are required in the request:
idversion
Note: The following fields are not required when patching unless you're updating them specifically:
oidc.issuerUrloidc.clientIdauthzWebhook.serverauthnWebhook.server
To upgrade a cluster, provide the new version number in the version field and specify "version" in the updateMask. See Upgrade Kubernetes for more information.
For example, to upgrade a cluster to version 1.32, the request body would include:
{"version": "1.32","updateMask": "version"}
Remember to include all other required fields in your request.
The supported fields and their data types are as follows.
{"id": string,"updateMask": string <field-mask>,"public": boolean,"version": string,"oidc": {"issuerUrl": string,"clientId": string,"usernameClaim": string,"usernamePrefix": string,"groupsClaim": string,"groupsPrefix": string,"ca": string,"requiredClaim": string,"signingAlgorithms": Array of integers <enum> [ items <enum > ],},"authzWebhook": {"server": string,"ca": string},"authnWebhook": {"server": string,"ca": string},"auditPolicy": string,}
Submit the request, passing the JSON object in the body as data.json.
$curl -X PATCH https://api.coreweave.com/v1beta1/cks/clusters/{id} \-H "Content-Type: application/json" \-H "Authorization: Bearer {API_ACCESS_TOKEN}" \-d @data.json
A successful response returns the updated cluster object.
{"cluster": {"id": string,"name": string,"zone": string,"vpcId": string,"public": boolean,"version": string,"network": {"podCidrName": string,"serviceCidrName": string,"internalLbCidrNames": Array of strings},"oidc": {"issuerUrl": string,"clientId": string,"usernameClaim": string,"usernamePrefix": string,"groupsClaim": string,"groupsPrefix": string,"ca": string,"requiredClaim": string,"signingAlgorithms": Array of integers <enum> [ items <enum > ],},"authzWebhook": {"server": string,"ca": string},"authnWebhook": {"server": string,"ca": string},"auditPolicy": string,"status": integer <enum>,"apiServerEndpoint": string,"createdAt": string <date-time>,"updatedAt": string <date-time>}}