CKS API Reference
Users with administrative permissions 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:
name
zone
vpcId
public
version
network.podCidrName
network.serviceCidrName
network.internalLbCidrNames
oidc.issuerUrl
oidc.clientId
authzWebhook.server
authnWebhook.server
- Create a VPC before creating a cluster, and supply the
vpcId
in the cluster configuration. - The cluster
id
should 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 update a CKS cluster's configuration, use the PATCH
method with the /v1beta1/cks/clusters/{id}
endpoint. Substitute {id}
with the cluster ID.
The cluster configuration must be supplied as a JSON object in the request body. The following fields are required in the request:
id
oidc.issuerUrl
oidc.clientId
authzWebhook.server
authnWebhook.server
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>}}