import requests
url = "https://platform.ankra.app/api/v1/clusters/upcloud"
payload = {
"credential_id": "<string>",
"name": "<string>",
"zone": "<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({credential_id: '<string>', name: '<string>', zone: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/upcloud', 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/upcloud \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential_id": "<string>",
"name": "<string>",
"zone": "<string>"
}
'{
"cluster_id": "<string>",
"name": "<string>",
"warnings": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create an UpCloud cluster
Creates an UpCloud cluster from the request and starts provisioning it in the background, answering 201 with the new cluster’s cluster_id and name. A configuration that fails validation answers 400 with the reason, and an organisation whose billing is restricted is refused with 402.
import requests
url = "https://platform.ankra.app/api/v1/clusters/upcloud"
payload = {
"credential_id": "<string>",
"name": "<string>",
"zone": "<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({credential_id: '<string>', name: '<string>', zone: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/upcloud', 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/upcloud \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"credential_id": "<string>",
"name": "<string>",
"zone": "<string>"
}
'{
"cluster_id": "<string>",
"name": "<string>",
"warnings": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
Cluster name: 1 to 53 lowercase letters, digits and hyphens, starting with a letter and ending with a letter or digit (an RFC 1035 DNS label). It prefixes every server hostname of the cluster; a create carrying any other name is refused, and nothing is created.
1 - 53^[a-z]([-a-z0-9]*[a-z0-9])?$IPv4 addresses or CIDRs allowed to reach the bastion's SSH port. The platform's own egress addresses are always allowed in addition, so the platform can never be locked out. Omit (or send an empty list) to keep the bastion reachable from anywhere (key-only SSH, rate-limited). IPv6 and 0.0.0.0/0 entries are refused; at most 64 entries.
64UpCloud NAT gateway plan every node's outbound internet runs through, from GET /api/v1/clusters/upcloud/gateway-plans. Omitted is 'standard', the cheapest plan on two servers: a one-server plan ('development', 'essentials') loses all cluster egress while UpCloud rebuilds it. An unlisted plan answers 400.
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 Install the Kubernetes Gateway API beside Traefik's Ingress: the Gateway API standard CRDs, Traefik's Gateway provider with the traefik GatewayClass and a shared traefik-gateway Gateway in the traefik namespace (a plain HTTP listener that accepts routes from every namespace), cert-manager's Gateway support, and external-dns publishing of HTTPRoute hostnames. Ingress keeps working; one Traefik serves both. Requires include_networking.
k3s packaged components to keep disabled (k3s --disable), for example ["traefik"] on a cluster that brings its own ingress. k3s distribution only: the list is rendered into the server config at install and re-asserted by the maintenance pass, so the entries stay off across restarts.
coredns, servicelb, traefik, local-storage, metrics-server, runtimes Zone pool for a multi-zone cluster. Must contain zone (the primary zone: bastion, first control plane and default network). Each additional zone gets its own SDN router, private network and NAT gateway, and the nodes are joined by a platform-managed WireGuard mesh. More than one zone needs at least three zones and three control planes. Omitted keeps the cluster in zone only.
Response
Cluster created successfully