Skip to main content
POST
/
kubernetes_clusters
Typescript (SDK)
import { Latitudesh } from "latitudesh-typescript-sdk";

const latitudesh = new Latitudesh({
  bearer: process.env["LATITUDESH_BEARER"] ?? "",
});

async function run() {
  const result = await latitudesh.kubernetesClusters.createKubernetesCluster({
    data: {
      type: "kubernetes_clusters",
      attributes: {
        name: "my-cluster",
        projectId: "proj_6059EqYkOQj8p",
        site: "SAN3",
        plan: "c2-small-x86",
        sshKeys: [
          "ssh_VkE1DwV37dnZJ",
        ],
      },
    },
  });

  console.log(result);
}

run();
{
  "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