import requests
url = "https://platform.ankra.app/api/v1/clusters/aws/preflight"
payload = {
"name": "<string>",
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ssh_key_credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"region": "<string>",
"vpc_id": "<string>",
"node_subnet_ids": ["<string>"],
"bastion_subnet_id": "<string>",
"bastion_allowed_ips": ["<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({
name: '<string>',
credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ssh_key_credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
region: '<string>',
vpc_id: '<string>',
node_subnet_ids: ['<string>'],
bastion_subnet_id: '<string>',
bastion_allowed_ips: ['<string>']
})
};
fetch('https://platform.ankra.app/api/v1/clusters/aws/preflight', 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/aws/preflight \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ssh_key_credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"region": "<string>",
"vpc_id": "<string>",
"node_subnet_ids": [
"<string>"
],
"bastion_subnet_id": "<string>",
"bastion_allowed_ips": [
"<string>"
]
}
'{
"items": [
{
"check": "<string>",
"status": "ok",
"message": "<string>"
}
],
"can_proceed": true,
"resolved_egress_mode": "existing"
}{
"cluster_id": "11111111-2222-4333-8444-555555555555",
"name": "aws-prod",
"kind": "aws",
"state": "creating",
"operation_id": null
}{
"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 an AWS EC2 cluster create
Bearer PAT authentication; RBAC permission clusters.create. Runs every check the create runs against AWS without creating anything. Each item is three-state: ok, warning (a read Ankra could not perform, or a caveat such as flannel not enforcing the IMDS guard), or error. resolved_egress_mode is the mode the create will run under, null when it could not be decided. Answers 404 while the organisation’s aws_provider feature flag is off.
import requests
url = "https://platform.ankra.app/api/v1/clusters/aws/preflight"
payload = {
"name": "<string>",
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ssh_key_credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"region": "<string>",
"vpc_id": "<string>",
"node_subnet_ids": ["<string>"],
"bastion_subnet_id": "<string>",
"bastion_allowed_ips": ["<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({
name: '<string>',
credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
ssh_key_credential_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
region: '<string>',
vpc_id: '<string>',
node_subnet_ids: ['<string>'],
bastion_subnet_id: '<string>',
bastion_allowed_ips: ['<string>']
})
};
fetch('https://platform.ankra.app/api/v1/clusters/aws/preflight', 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/aws/preflight \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ssh_key_credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"region": "<string>",
"vpc_id": "<string>",
"node_subnet_ids": [
"<string>"
],
"bastion_subnet_id": "<string>",
"bastion_allowed_ips": [
"<string>"
]
}
'{
"items": [
{
"check": "<string>",
"status": "ok",
"message": "<string>"
}
],
"can_proceed": true,
"resolved_egress_mode": "existing"
}{
"cluster_id": "11111111-2222-4333-8444-555555555555",
"name": "aws-prod",
"kind": "aws",
"state": "creating",
"operation_id": null
}{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Body
POST /clusters/aws body. Nodes never receive a public IP; the bastion holds the elastic IP and is the SSH hop (and the NAT instance in bastion_nat mode).
An organisation aws credential: a keys credential, or a role onboarded with scope provisioning or self_managed (cost-scoped roles are refused).
Region slug, validated against ec2:DescribeRegions.
Private subnets the nodes spread across; one or more, their zones become the cluster's zone pool.
1A public subnet (internet-gateway default route) for the bastion.
IPv4 CIDRs allowed to SSH to the bastion; 0.0.0.0/0 and ::/0 are refused.
1Omitted: resolved by preflight. existing keeps the subnets' NAT routing; bastion_nat makes the bastion the NAT instance behind one Ankra-owned route table and is refused when a node subnet carries instances Ankra did not create.
existing, bastion_nat At least 3 when the node subnets span more than one availability zone.
1 <= x <= 90 <= x <= 100Show child attributes
Show child attributes
k3s, kubeadm stacked, external Defaults to cilium for both distributions: the AWS stack's IMDS guard is a network policy only Cilium and Calico enforce. flannel is accepted with a preflight warning; kubeadm requires cilium.
flannel, calico, cilium Show child attributes
Show child attributes
arm64 is refused with a 422 naming the pending image-catalogue audit (ADR 0015 §6).
amd64 Encrypted gp3 root volume of every instance.
20 <= x <= 2000delete, retain Must be true when present: the AWS cloud-controller-manager is mandatory.