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.GetLksCluster(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.LksCluster != nil {
// handle response
}
}curl --request GET \
--url https://api.latitude.sh/lks/clusters/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.latitude.sh/lks/clusters/{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/{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/{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/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/lks/clusters/{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": "lksc_pRMLydp0dQKr1",
"type": "lks_clusters",
"attributes": {
"name": "production",
"description": "",
"project_id": "proj_6059EqYkOQj8p",
"site": "DAL2",
"status": "ready",
"message": "",
"reason": "",
"control_plane_endpoint": "https://lksc-prmlydp0dqkr1.lks.latitude.sh:6443",
"kubeconfig_url": "/lks/clusters/lksc_pRMLydp0dQKr1/kubeconfig",
"kubernetes_version": "1.36.3",
"platform_version": "lks-v1.36.3-002",
"network": {
"pod_cidrs": [
"10.0.0.0/12"
],
"service_cidrs": [
"10.96.0.0/15"
],
"node_cidrs": [
"10.16.0.0/21"
]
},
"created_at": "2026-09-01T12:00:00Z",
"updated_at": "2026-09-01T12:18:00Z"
}
}
}LKS
Get an LKS cluster
Retrieves a single LKS cluster.
status is an open enum sourced from the platform controller — provisioning, ready, updating, scaling, upgrading, paused, deleting and deleted are the values in use today, and new ones may appear without notice. reason and message carry the machine-readable and human-readable detail behind the current status.
GET
/
lks
/
clusters
/
{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.GetLksCluster(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.LksCluster != nil {
// handle response
}
}curl --request GET \
--url https://api.latitude.sh/lks/clusters/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.latitude.sh/lks/clusters/{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/{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/{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/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.latitude.sh/lks/clusters/{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": "lksc_pRMLydp0dQKr1",
"type": "lks_clusters",
"attributes": {
"name": "production",
"description": "",
"project_id": "proj_6059EqYkOQj8p",
"site": "DAL2",
"status": "ready",
"message": "",
"reason": "",
"control_plane_endpoint": "https://lksc-prmlydp0dqkr1.lks.latitude.sh:6443",
"kubeconfig_url": "/lks/clusters/lksc_pRMLydp0dQKr1/kubeconfig",
"kubernetes_version": "1.36.3",
"platform_version": "lks-v1.36.3-002",
"network": {
"pod_cidrs": [
"10.0.0.0/12"
],
"service_cidrs": [
"10.96.0.0/15"
],
"node_cidrs": [
"10.16.0.0/21"
]
},
"created_at": "2026-09-01T12:00:00Z",
"updated_at": "2026-09-01T12:18:00Z"
}
}
}Was this page helpful?