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"
}
}
}Creates a new managed Kubernetes cluster. Maximum of 1 cluster per project.
Cluster names must follow Kubernetes naming rules: lowercase alphanumeric characters or hyphens, must start and end with an alphanumeric character, and be at most 63 characters long.
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"
}
}
}Was this page helpful?