import requests
url = "https://platform.ankra.app/org/clusters/ankracloud/preflight"
payload = {
"bastion_plan": "c1-2",
"control_plane_plan": "c2-4",
"credential_id": "11111111-2222-4333-8444-555555555555",
"name": "ankra-prod",
"ssh_key_credential_id": "99999999-8888-4777-8666-555555555555",
"zone": "de-fsn1"
}
headers = {
"cookie": "ankra_session=",
"X-Ankra-CSRF": "<x-ankra-csrf>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: 'ankra_session=',
'X-Ankra-CSRF': '<x-ankra-csrf>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
bastion_plan: 'c1-2',
control_plane_plan: 'c2-4',
credential_id: '11111111-2222-4333-8444-555555555555',
name: 'ankra-prod',
ssh_key_credential_id: '99999999-8888-4777-8666-555555555555',
zone: 'de-fsn1'
})
};
fetch('https://platform.ankra.app/org/clusters/ankracloud/preflight', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/clusters/ankracloud/preflight \
--header 'Content-Type: application/json' \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session= \
--data '
{
"bastion_plan": "c1-2",
"control_plane_plan": "c2-4",
"credential_id": "11111111-2222-4333-8444-555555555555",
"name": "ankra-prod",
"ssh_key_credential_id": "99999999-8888-4777-8666-555555555555",
"zone": "de-fsn1"
}
'{
"can_proceed": true,
"items": [
{
"check": "<string>",
"message": "<string>",
"status": "pass"
}
]
}{
"detail": "Cluster not found"
}{
"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"
}Preflight Ankra Cloud cluster (browser session)
Browser session authentication; RBAC permission clusters. RBAC permission clusters.create. Checks the create request against the account without creating anything: the credential authenticates, the zone offers compute, every plan and the template exist, an adopted network lives in the zone, and the counts are within bounds. Answers 404 while the organisation's ankra_cloud_provider` feature flag is off.
import requests
url = "https://platform.ankra.app/org/clusters/ankracloud/preflight"
payload = {
"bastion_plan": "c1-2",
"control_plane_plan": "c2-4",
"credential_id": "11111111-2222-4333-8444-555555555555",
"name": "ankra-prod",
"ssh_key_credential_id": "99999999-8888-4777-8666-555555555555",
"zone": "de-fsn1"
}
headers = {
"cookie": "ankra_session=",
"X-Ankra-CSRF": "<x-ankra-csrf>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
cookie: 'ankra_session=',
'X-Ankra-CSRF': '<x-ankra-csrf>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
bastion_plan: 'c1-2',
control_plane_plan: 'c2-4',
credential_id: '11111111-2222-4333-8444-555555555555',
name: 'ankra-prod',
ssh_key_credential_id: '99999999-8888-4777-8666-555555555555',
zone: 'de-fsn1'
})
};
fetch('https://platform.ankra.app/org/clusters/ankracloud/preflight', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/org/clusters/ankracloud/preflight \
--header 'Content-Type: application/json' \
--header 'X-Ankra-CSRF: <x-ankra-csrf>' \
--cookie ankra_session= \
--data '
{
"bastion_plan": "c1-2",
"control_plane_plan": "c2-4",
"credential_id": "11111111-2222-4333-8444-555555555555",
"name": "ankra-prod",
"ssh_key_credential_id": "99999999-8888-4777-8666-555555555555",
"zone": "de-fsn1"
}
'{
"can_proceed": true,
"items": [
{
"check": "<string>",
"message": "<string>",
"status": "pass"
}
]
}{
"detail": "Cluster not found"
}{
"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
Browser session. Mutations also require X-Ankra-CSRF.
Headers
Must match the ankra_csrf browser cookie.
Body
Ankra Cloud zone (GET /clusters/ankracloud/zones); every server of the cluster is placed there.
IPv4/IPv6 addresses or CIDRs allowed to SSH to the bastion; empty allows any source.
Accepted for contract symmetry with the managed-gateway providers and ignored: the bastion listens on 22.
kubeadm supports only cilium on Ankra Cloud.
flannel, calico, cilium Show child attributes
Show child attributes
1 <= x <= 9k3s, kubeadm Required for an external etcd topology.
stacked, external GitOps provider of the repository the cluster is bootstrapped onto. Omitted is github, where gitops_repository is owner/name. bitbucket_cloud names the repository by gitops_workspace and gitops_repo_slug (or gitops_repository as workspace/repo_slug) and binds it as a Bitbucket Cloud repository.
github, bitbucket_cloud Bitbucket Cloud workspace of the GitOps repository. Only with gitops_provider bitbucket_cloud; provided together with gitops_repo_slug.
Bitbucket Cloud repository slug of the GitOps repository. Only with gitops_provider bitbucket_cloud; provided together with gitops_workspace.
RFC 1918 CIDR (/16 through /29) of the private network Ankra creates; omitted derives one per cluster.
Show child attributes
Show child attributes
Adopts an existing private network in the zone; mutually exclusive with network_ip_range. An adopted network is never deleted by the cluster.
delete, retain Credential the running cluster's cloud-controller-manager and CSI use; omitted reuses credential_id.
Public OS template id (GET /clusters/ankracloud/templates).
0 <= x <= 100Required when worker_count is above zero and no node_groups are given.