curl --request POST \
--url https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/teardown \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/teardown"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/teardown', 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}/teardown",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/teardown"
req, _ := http.NewRequest("POST", 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.post("https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/teardown")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/teardown")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "44444444-4444-4444-8444-444444444444",
"kind": "kubernetes",
"organization_id": "22222222-2222-4222-8222-222222222222",
"access_mode": "kubernetes",
"state": "deleting",
"network_mode": "public",
"endpoint": null,
"credential_state": "pending",
"namespace": "k8s-22222222-2222-4222-8222-222222222222",
"node_count": 1,
"gpu_count": 8,
"progress": {
"stages": [
{
"key": "workers",
"label": "Release the workers",
"status": "running",
"detail": "0 of 1 confirmed"
},
{
"key": "namespace",
"label": "Delete the cluster namespace",
"status": "running",
"detail": null
}
]
},
"created_at": "2026-10-14T12:00:00Z",
"updated_at": "2026-10-14T13:00:00Z"
}Tear down a cluster
Stops a launch in progress or tears down a cluster. Ornn deletes the cluster’s workloads, revokes its access, and sends cleanup to every worker. The cluster stays in state deleting, with teardown stages in progress, while Ornn waits up to five minutes for workers to confirm cleanup; then its record is removed. Workers that never confirm are released anyway and cleaned when they reconnect. Reservation billing continues, and separately provisioned filesystems are not deleted.
Repeating the request while the cluster is deleting returns only its state and does not restart cleanup. Teardown is complete when the cluster is absent from listClusters and getClusterAccess returns 404 cluster_not_found; this operation then returns 404 with an empty body. If the state becomes failed instead, send the teardown again, and contact Ornn if it fails twice. Wait for teardown to finish before creating another cluster.
curl --request POST \
--url https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/teardown \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/teardown"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/teardown', 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}/teardown",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/teardown"
req, _ := http.NewRequest("POST", 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.post("https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/teardown")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ornn.com/v1/orchestrator/controllers/{controller_id}/teardown")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "44444444-4444-4444-8444-444444444444",
"kind": "kubernetes",
"organization_id": "22222222-2222-4222-8222-222222222222",
"access_mode": "kubernetes",
"state": "deleting",
"network_mode": "public",
"endpoint": null,
"credential_state": "pending",
"namespace": "k8s-22222222-2222-4222-8222-222222222222",
"node_count": 1,
"gpu_count": 8,
"progress": {
"stages": [
{
"key": "workers",
"label": "Release the workers",
"status": "running",
"detail": "0 of 1 confirmed"
},
{
"key": "namespace",
"label": "Delete the cluster namespace",
"status": "running",
"detail": null
}
]
},
"created_at": "2026-10-14T12:00:00Z",
"updated_at": "2026-10-14T13:00:00Z"
}ornn login:
ornn clusters teardown CLUSTER_ID --wait
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
Teardown accepted, or already in progress. Poll for completion. Reservation billing continues.
- Option 1
- Option 2
The namespace Ornn configures for your workloads.
Workers attached when this response was built; usually 0 right after a launch.
GPUs on the workers counted in node_count.
Stages of the latest launch or teardown. Launch stages are create_plane, prepare_hosts, join_workers, apply_plane, and issue_access. Teardown stages include workers and the control-plane stage (namespace for Kubernetes, stack for Slurm), plus nodes or storage when those steps fail.
Show child attributes
Show child attributes
Was this page helpful?