Create a debug pod
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/debug-pods"
payload = { "namespace": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({namespace: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/debug-pods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/debug-pods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"namespace": "<string>"
}
'{
"pod_name": "<string>",
"namespace": "<string>",
"container_name": "<string>",
"image": "<string>",
"node_name": "<string>",
"phase": "<string>",
"ready": true,
"expires_at": "2023-11-07T05:31:56Z",
"mirrored_volumes": [
"<string>"
],
"mirrored_volume_mounts": [
"<string>"
],
"mirrored_environment_variables": 123,
"mirrored_environment_sources": 123,
"warnings": [
"<string>"
],
"requested_by": "<string>",
"target_pod_name": "<string>",
"target_container_name": "<string>",
"service_account_name": "<string>"
}Kubernetes
Create a debug pod
Starts a short-lived debug pod in a namespace, optionally beside a target pod with its volume mounts and environment mirrored, and removes it when its TTL runs out. Requires kubernetes.write and kubernetes.exec on the cluster and an agent new enough to run it.
POST
/
api
/
v1
/
clusters
/
{cluster_id}
/
kubernetes
/
debug-pods
Create a debug pod
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/debug-pods"
payload = { "namespace": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({namespace: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/debug-pods', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubernetes/debug-pods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"namespace": "<string>"
}
'{
"pod_name": "<string>",
"namespace": "<string>",
"container_name": "<string>",
"image": "<string>",
"node_name": "<string>",
"phase": "<string>",
"ready": true,
"expires_at": "2023-11-07T05:31:56Z",
"mirrored_volumes": [
"<string>"
],
"mirrored_volume_mounts": [
"<string>"
],
"mirrored_environment_variables": 123,
"mirrored_environment_sources": 123,
"warnings": [
"<string>"
],
"requested_by": "<string>",
"target_pod_name": "<string>",
"target_container_name": "<string>",
"service_account_name": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The cluster.
Body
application/json
A pod to attach beside, sharing its node and optionally its mounts and environment.
Defaults to the catalogue's default image; any image is accepted.
How long the pod lives before it is removed.
Response
The debug pod.