v1

latestSwagger 2.02026-08-04232286653.5 KB
Kubernetes Clusters

Creates a Kubernetes cluster in the project and returns the async operation.

post/projects/{project_id}/kubernetes/clusters

Path parameters

project_idstring required

ID of the project to create the cluster in.

Request body

add_onsstring[]

List of add-ons to include in the new cluster.

apiserver_extra_argsobject

Extra arguments to pass to the kube-apiserver control plane component.

cluster_cidrstring

Range of IP addresses allocated to pods scheduled on worker nodes, in CIDR notation.

configuration'ha'

Configuration setting is deprecated, defaults to HA configuration.

controller_manager_extra_argsobject

Extra arguments to pass to the kube-controller-manager control plane component.

kubelogin_argsobject

Arguments for the kubectl oidc-login plugin.

locationstring required

Location to create the Kubernetes cluster in.

namestring required

Name of the Kubernetes cluster.

node_cidr_mask_sizeinteger

Mask size for the cluster CIDR.

privateboolean

Whether the cluster is private (without a public IP). Defaults to false.

scheduler_extra_argsobject

Extra arguments to pass to the kube-scheduler control plane component.

service_cluster_ip_rangestring

Range of IP addresses allocated to Kubernetes services, in CIDR notation.

subnet_idstring

ID of the subnet to create the cluster in. Must be in the location specified. If not provided, the default subnet for the location is used, if there is one.

versionstring required

Version of the Crusoe Kubernetes image to create the cluster with.

Example request

{
  "add_ons": [
    "crusoe_csi",
    "nvidia_gpu_operator",
    "nvidia_network_operator"
  ],
  "apiserver_extra_args": {
    "audit-log-maxage": "30"
  },
  "auth_config": {
    "oidc": {
      "client_id": "kubernetes",
      "groups_claim": "groups",
      "issuer_url": "https://oauth2.example.com",
      "username_claim": "email",
      "username_prefix": "oidc:"
    }
  },
  "cluster_cidr": "10.233.0.0/18",
  "configuration": "ha",
  "controller_manager_extra_args": {
    "bind-address": "0.0.0.0"
  },
  "kubelogin_args": {
    "force-refresh": "",
    "oidc-extra-scope": "email groups"
  },
  "location": "us-northcentral1-a",
  "name": "my-kubernetes-cluster",
  "node_cidr_mask_size": 24,
  "private": true,
  "scheduler_extra_args": {
    "bind-address": "0.0.0.0"
  },
  "service_cluster_ip_range": "10.233.0.0/18",
  "subnet_id": "09ae8411-0fbb-411c-898c-2b8f19622ae1",
  "version": "1.29.5-crusoe.0"
}

Response

Example response

{
  "operation": {
    "completed_at": "2021-12-03T19:59:34Z",
    "metadata": "{}",
    "operation_id": "F6EF489C-086E-458D-B812-7962964A28C9",
    "result": "{}",
    "started_at": "2021-12-03T19:58:34Z",
    "state": "IN_PROGRESS"
  }
}