Find the latest node drain (browser session)
import requests
url = "https://api.platform.ankra.app/org/clusters/{cluster_id}/kubernetes/node-drains"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/clusters/{cluster_id}/kubernetes/node-drains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/clusters/{cluster_id}/kubernetes/node-drains \
--cookie ankra_session={
"operation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"last_pod": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"deadline": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"cancel_requested": true,
"running": true,
"before": {
"node": {
"name": "<string>",
"uid": "<string>",
"resource_version": "<string>",
"unschedulable": true
},
"pods": [
{
"name": "<string>",
"namespace": "<string>",
"uid": "<string>",
"resource_version": "<string>",
"controller": "<string>",
"retained_reason": "<string>",
"local_data": true,
"terminating": true
}
],
"budgets": [
{
"name": "<string>",
"namespace": "<string>",
"disruptions_allowed": 123,
"observed": true
}
]
},
"options": {
"allow_local_data": true,
"allow_unmanaged": true
},
"phase": "prepared",
"version": 123,
"remaining": [
{
"name": "<string>",
"namespace": "<string>",
"uid": "<string>",
"resource_version": "<string>",
"controller": "<string>",
"retained_reason": "<string>",
"local_data": true,
"terminating": true
}
],
"budgets": [
{
"name": "<string>",
"namespace": "<string>",
"disruptions_allowed": 123,
"observed": true
}
]
}
}Kubernetes
Find the latest node drain (browser session)
Recover the last receipt by node name without contacting Kubernetes.
GET
/
org
/
clusters
/
{cluster_id}
/
kubernetes
/
node-drains
Find the latest node drain (browser session)
import requests
url = "https://api.platform.ankra.app/org/clusters/{cluster_id}/kubernetes/node-drains"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/clusters/{cluster_id}/kubernetes/node-drains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/clusters/{cluster_id}/kubernetes/node-drains \
--cookie ankra_session={
"operation": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"last_pod": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"deadline": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"cancel_requested": true,
"running": true,
"before": {
"node": {
"name": "<string>",
"uid": "<string>",
"resource_version": "<string>",
"unschedulable": true
},
"pods": [
{
"name": "<string>",
"namespace": "<string>",
"uid": "<string>",
"resource_version": "<string>",
"controller": "<string>",
"retained_reason": "<string>",
"local_data": true,
"terminating": true
}
],
"budgets": [
{
"name": "<string>",
"namespace": "<string>",
"disruptions_allowed": 123,
"observed": true
}
]
},
"options": {
"allow_local_data": true,
"allow_unmanaged": true
},
"phase": "prepared",
"version": 123,
"remaining": [
{
"name": "<string>",
"namespace": "<string>",
"uid": "<string>",
"resource_version": "<string>",
"controller": "<string>",
"retained_reason": "<string>",
"local_data": true,
"terminating": true
}
],
"budgets": [
{
"name": "<string>",
"namespace": "<string>",
"disruptions_allowed": 123,
"observed": true
}
]
}
}