Skip to main content
POST
/
kubernetes_clusters
Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os


with Latitudesh(
    bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:

    res = latitudesh.kubernetes_clusters.create_kubernetes_cluster(data={
        "type": latitudesh_python_sdk.CreateKubernetesClusterType.KUBERNETES_CLUSTERS,
        "attributes": {
            "name": "my-cluster",
            "project_id": "proj_6059EqYkOQj8p",
            "site": "SAN3",
            "plan": "c2-small-x86",
            "ssh_keys": [
                "ssh_VkE1DwV37dnZJ",
            ],
        },
    })

    # Handle response
    print(res)
{
  "data": {
    "type": "kubernetes_clusters",
    "id": "kc_pRMLydp0dQKr1",
    "attributes": {
      "name": "my-cluster",
      "status": "provisioning",
      "control_plane_endpoint": "https://api.my-cluster.example.com:6443"
    }
  }
}

Authorizations

Authorization
string
header
required

Body

application/vnd.api+json
data
object
required

Response

Created

Response schema for cluster creation (minimal fields returned during provisioning)

data
object