Go (SDK)
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Lks.GetLksNodePool(ctx, "<id>", "<id>")
if err != nil {
log.Fatal(err)
}
if res.LksNodePool != nil {
// handle response
}
}curl --request GET \
--url https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "lksnp_9dQKr1pRMLyd",
"type": "lks_node_pools",
"attributes": {
"name": "pool-a",
"type": "bare_metal",
"mode": "on_demand",
"plan": "c2-small-x86",
"description": "",
"count": 2,
"max_pods_per_node": null,
"kubernetes_version": "1.36.3",
"platform_version": "lks-v1.36.3-002",
"status": "ready",
"message": "",
"reason": "",
"ready_nodes": 2,
"labels": {
"workload": "general"
},
"taints": [
{
"key": "dedicated",
"value": "gpu",
"effect": "NoSchedule"
}
],
"created_at": "2026-09-01T12:05:00Z",
"updated_at": "2026-09-01T12:22:00Z"
}
}
}LKS
Get a node pool
Retrieves a single node pool of an LKS cluster. ready_nodes reports how many of the pool’s count nodes have joined the cluster.
GET
/
lks
/
clusters
/
{cluster_id}
/
nodepools
/
{id}
Go (SDK)
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.Lks.GetLksNodePool(ctx, "<id>", "<id>")
if err != nil {
log.Fatal(err)
}
if res.LksNodePool != nil {
// handle response
}
}curl --request GET \
--url https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/lks/clusters/{cluster_id}/nodepools/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "lksnp_9dQKr1pRMLyd",
"type": "lks_node_pools",
"attributes": {
"name": "pool-a",
"type": "bare_metal",
"mode": "on_demand",
"plan": "c2-small-x86",
"description": "",
"count": 2,
"max_pods_per_node": null,
"kubernetes_version": "1.36.3",
"platform_version": "lks-v1.36.3-002",
"status": "ready",
"message": "",
"reason": "",
"ready_nodes": 2,
"labels": {
"workload": "general"
},
"taints": [
{
"key": "dedicated",
"value": "gpu",
"effect": "NoSchedule"
}
],
"created_at": "2026-09-01T12:05:00Z",
"updated_at": "2026-09-01T12:22:00Z"
}
}
}Was this page helpful?