Declare a custom DNS zone on the cluster
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/custom-dns-zones"
payload = {
"credential_name": "smartoptics-dns",
"zone": "launch.smartoptics.dev"
}
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({credential_name: 'smartoptics-dns', zone: 'launch.smartoptics.dev'})
};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/custom-dns-zones', 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}/custom-dns-zones \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential_name": "smartoptics-dns",
"zone": "launch.smartoptics.dev"
}
'{
"success": true,
"zone": "<string>",
"credential_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Clusters
Declare a custom DNS zone on the cluster
The DNS zones this cluster serves with the organisation’s own external-dns webhook credential, alongside the delegated zone Ankra serves itself. Ankra’s own Avura token is pinned to Ankra’s account, so ingress hosts on a zone the customer holds in their own provider account are dropped server-side and publish nothing. Declaring the zone here has Ankra render and own an external-dns deployment for it, pinned to that zone with its own txt owner id. A zone that overlaps the delegated zone Ankra already serves for this cluster is refused with 400: two sync-policy controllers on one zone delete each other’s records.
POST
/
api
/
v1
/
clusters
/
{cluster_id}
/
custom-dns-zones
Declare a custom DNS zone on the cluster
import requests
url = "https://platform.ankra.app/api/v1/clusters/{cluster_id}/custom-dns-zones"
payload = {
"credential_name": "smartoptics-dns",
"zone": "launch.smartoptics.dev"
}
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({credential_name: 'smartoptics-dns', zone: 'launch.smartoptics.dev'})
};
fetch('https://platform.ankra.app/api/v1/clusters/{cluster_id}/custom-dns-zones', 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}/custom-dns-zones \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential_name": "smartoptics-dns",
"zone": "launch.smartoptics.dev"
}
'{
"success": true,
"zone": "<string>",
"credential_name": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.