import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.kubernetesClusters.listKubernetesClusters({
projectId: "<id>",
});
console.log(result);
}
run();{
"data": [
{
"type": "kubernetes_clusters",
"id": "kc_pRMLydp0dQKr1",
"attributes": {
"name": "my-cluster",
"phase": "Provisioned",
"ready": true,
"infrastructure_ready": true,
"control_plane_ready": true,
"message": "Cluster is ready",
"steps": [
{
"name": "infrastructure",
"status": "completed"
},
{
"name": "control_plane",
"status": "completed"
},
{
"name": "workers",
"status": "completed"
}
],
"last_status_change": "2026-01-15T10:35:00Z",
"created_at": "2026-01-15T10:30:00Z"
}
}
]
}Lists all Kubernetes clusters for a project.
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.kubernetesClusters.listKubernetesClusters({
projectId: "<id>",
});
console.log(result);
}
run();{
"data": [
{
"type": "kubernetes_clusters",
"id": "kc_pRMLydp0dQKr1",
"attributes": {
"name": "my-cluster",
"phase": "Provisioned",
"ready": true,
"infrastructure_ready": true,
"control_plane_ready": true,
"message": "Cluster is ready",
"steps": [
{
"name": "infrastructure",
"status": "completed"
},
{
"name": "control_plane",
"status": "completed"
},
{
"name": "workers",
"status": "completed"
}
],
"last_status_change": "2026-01-15T10:35:00Z",
"created_at": "2026-01-15T10:30:00Z"
}
}
]
}Was this page helpful?