curl --request GET \
--url https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access', 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.ornn.com/v1/orchestrator/controllers/{controller_id}/access",
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: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"kind": "kubernetes",
"kubeconfig": "apiVersion: v1\nkind: Config\nclusters:\n- name: k8s-22222222-2222-4222-8222-222222222222\n cluster:\n server: https://cluster.example.com:6443\n certificate-authority-data: <base64-cluster-ca>\ncontexts:\n- name: k8s-22222222-2222-4222-8222-222222222222\n context:\n cluster: k8s-22222222-2222-4222-8222-222222222222\n namespace: k8s-22222222-2222-4222-8222-222222222222\n user: ornn-tenant\ncurrent-context: k8s-22222222-2222-4222-8222-222222222222\nusers:\n- name: ornn-tenant\n user:\n token: <cluster-credential>\n",
"endpoint": "https://cluster.example.com:6443",
"namespace": "k8s-22222222-2222-4222-8222-222222222222",
"expires_at": "2026-11-08T03:15:01Z"
}Get cluster access
Returns the issued access for an owned cluster. A Kubernetes cluster returns a kubeconfig, its API server endpoint, and the namespace Ornn configured for your workloads. A Slurm cluster returns its SSH login details. While a launch is still running, 404 kubernetes_credentials_not_ready or slurm_credentials_not_ready means access has not been issued yet; keep polling listClusters. 404 cluster_not_found means the cluster does not exist or is not visible to your organization, including after its teardown finishes. Access stays readable while a teardown is in progress.
The kubeconfig token is issued for seven days and grants cluster-admin. Ornn issues a new one about two days before the stored token expires, and expires_at reports the stored token’s expiry. Read this endpoint again to get the current kubeconfig. An earlier download keeps working until its own token expires. The Ornn API key is not a Kubernetes credential.
curl --request GET \
--url https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access', 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.ornn.com/v1/orchestrator/controllers/{controller_id}/access",
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: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/access")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"kind": "kubernetes",
"kubeconfig": "apiVersion: v1\nkind: Config\nclusters:\n- name: k8s-22222222-2222-4222-8222-222222222222\n cluster:\n server: https://cluster.example.com:6443\n certificate-authority-data: <base64-cluster-ca>\ncontexts:\n- name: k8s-22222222-2222-4222-8222-222222222222\n context:\n cluster: k8s-22222222-2222-4222-8222-222222222222\n namespace: k8s-22222222-2222-4222-8222-222222222222\n user: ornn-tenant\ncurrent-context: k8s-22222222-2222-4222-8222-222222222222\nusers:\n- name: ornn-tenant\n user:\n token: <cluster-credential>\n",
"endpoint": "https://cluster.example.com:6443",
"namespace": "k8s-22222222-2222-4222-8222-222222222222",
"expires_at": "2026-11-08T03:15:01Z"
}ornn login. A Kubernetes cluster writes a kubeconfig; a Slurm cluster prints its SSH command.
ornn connect CLUSTER_ID --output ./ornn-kubeconfig.yaml
ornn connect CLUSTER_ID --print
Authorizations
Create an organization API key in Account Settings > Developer. Do not send this key to the Kubernetes API server.
Path Parameters
Cluster id returned by create or list; not a reservation ID.
Response
Issued access. The examples use fictional credentials.
- Option 1
- Option 2
kubernetes Sensitive kubeconfig YAML whose service-account token has cluster-admin rights and is issued for seven days. Store it with owner-only permissions. Ornn replaces the stored kubeconfig about two days before its token expires.
The cluster's Kubernetes API server URL. Send Kubernetes API calls here, not to api.ornn.com.
The namespace Ornn configured for your workloads, also the kubeconfig's default. Pods created here are scheduled onto your reserved workers and count against its GPU ResourceQuota.
When the returned kubeconfig's token expires. Null until Ornn first records it for a cluster issued before this field existed.
Was this page helpful?