Generate Kubeconfig Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubeconfig"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubeconfig', 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}/kubeconfig \
--header 'Authorization: Bearer <token>'{
"expires_at": "2023-11-07T05:31:56Z",
"kubeconfig": "<string>",
"server": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Cluster Access
Generate Kubeconfig Endpoint
POST
/
api
/
v1
/
clusters
/
{cluster_id}
/
kubeconfig
Generate Kubeconfig Endpoint
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubeconfig"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/kubeconfig', 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}/kubeconfig \
--header 'Authorization: Bearer <token>'{
"expires_at": "2023-11-07T05:31:56Z",
"kubeconfig": "<string>",
"server": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.