Rotate the cluster's DNS token
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/dns-zone/token-rotation"
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}/dns-zone/token-rotation', 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}/dns-zone/token-rotation \
--header 'Authorization: Bearer <token>'{
"success": true,
"fqdn": "<string>",
"state": "<string>",
"rotation_requested_at": "2023-11-07T05:31:56Z",
"previous_token_pending_revocation": true,
"revocation_requested_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Clusters
Rotate the cluster's DNS token
Asks Ankra to replace the write token the cluster’s external-dns uses to publish into its DNS zone. Ankra mints the replacement within about a minute and republishes the external-dns Secret; the replaced token stays valid until it is revoked, so the cluster keeps publishing meanwhile. Restart external-dns on the cluster so it reads the new Secret, confirm records still publish, then revoke the replaced token. Idempotent while a rotation is pending.
POST
/
api
/
v1
/
clusters
/
{cluster_id}
/
dns-zone
/
token-rotation
Rotate the cluster's DNS token
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/dns-zone/token-rotation"
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}/dns-zone/token-rotation', 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}/dns-zone/token-rotation \
--header 'Authorization: Bearer <token>'{
"success": true,
"fqdn": "<string>",
"state": "<string>",
"rotation_requested_at": "2023-11-07T05:31:56Z",
"previous_token_pending_revocation": true,
"revocation_requested_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Response
Successful Response