Cluster

Create a cluster

POST
Create a cluster in the Organization. An Astro cluster is a Kubernetes cluster that hosts the infrastructure required to run Deployments.

Path parameters

organizationIdstringRequired
The ID of the Organization to create the cluster in.

Request

This endpoint expects a union.
Create Aws Cluster Requestobject
OR
Create Azure Cluster Requestobject
OR
Create Gcp Cluster Requestobject

Response

This endpoint returns an object
cloudProvider
enum
The name of the cluster's cloud provider.
Allowed values: AWSAZUREGCP
createdAt
datetime

The time when the cluster was created in UTC. formatted as YYYY-MM-DDTHH:MM:SSZ.

dbInstanceType
string
The type of database instance that is used for the cluster.
id
string
The cluster's ID.
name
string
The cluster's name.
organizationId
string
The ID of the Organization that the cluster belongs to.
region
string
The region in which the cluster is created.
status
enum
The status of the cluster.
Allowed values: CREATINGCREATEDCREATE_FAILEDUPDATE_FAILEDUPDATING
type
enum
The type of the cluster.
Allowed values: DEDICATEDHYBRID
updatedAt
datetime

The time when the cluster was last updated in UTC. formatted as YYYY-MM-DDTHH:MM:SSZ.

vpcSubnetRange
string
The VPC subnet range.
isLimited
booleanOptional
Whether the cluster is limited.
metadata
objectOptional
nodePools
list of objectsOptional
The list of node pools that are created in the cluster.
podSubnetRange
stringOptional
The subnet range for Pods. For GCP clusters only.
providerAccount
stringOptional
The provider account ID. For GCP clusters only.
servicePeeringRange
stringOptional
The service peering range. For GCP clusters only.
serviceSubnetRange
stringOptional
The service subnet range. For GCP clusters only.
tags
list of objectsOptional
The Kubernetes tags in the cluster. For AWS Hybrid clusters only.
tenantId
stringOptional
The tenant ID. For Azure clusters only.
workspaceIds
list of stringsOptional
The list of Workspaces that are authorized to the cluster.
POST
1curl -X POST https://api.astronomer.io/platform/v1beta1/organizations/organizationId/clusters \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "cloudProvider": "AWS",
6 "dbInstanceType": "Small General Purpose",
7 "name": "My cluster",
8 "nodePools": [
9 {
10 "isDefault": true,
11 "maxNodeCount": 10,
12 "name": "my-nodepool",
13 "nodeInstanceType": "t3.medium"
14 }
15 ],
16 "providerAccount": "provider-account",
17 "region": "us-east-1",
18 "type": "DEDICATED",
19 "vpcSubnetRange": "172.20.0.0/22"
20}'
Response
1{
2 "cloudProvider": "AWS",
3 "createdAt": "2022-11-22T04:37:12Z",
4 "dbInstanceType": "db.t3.medium",
5 "id": "clm7k8tgw000008jz97i37y81",
6 "name": "my cluster",
7 "organizationId": "clm88r8hi000008jwhzxu5crg",
8 "region": "us-east-1",
9 "status": "CREATING",
10 "type": "DEDICATED",
11 "updatedAt": "2022-11-22T04:37:12Z",
12 "vpcSubnetRange": "172.20.0.0/22",
13 "isLimited": false,
14 "metadata": {
15 "externalIPs": [
16 "externalIPs"
17 ],
18 "oidcIssuerUrl": "https://westus2.oic.prod-aks.azure.com/b84efac8-cfae-467a-b223-23b9aea1486d/3075f79e-abc2-4602-a691-28117197e83d/"
19 },
20 "nodePools": [
21 {
22 "cloudProvider": "AWS",
23 "clusterId": "clm891jb6000308jrc3vjdtde",
24 "createdAt": "2022-11-22T04:37:12Z",
25 "id": "clm890zhe000208jr39dd0ubs",
26 "isDefault": true,
27 "maxNodeCount": 1,
28 "name": "default",
29 "nodeInstanceType": "t3.medium",
30 "updatedAt": "2022-11-22T04:37:12Z",
31 "supportedAstroMachines": [
32 "supportedAstroMachines"
33 ]
34 }
35 ],
36 "podSubnetRange": "172.21.0.0/19",
37 "providerAccount": "provider-account",
38 "servicePeeringRange": "172.23.0.0/20",
39 "serviceSubnetRange": "172.22.0.0/22",
40 "tags": [
41 {
42 "key": "key1",
43 "value": "value1"
44 }
45 ],
46 "tenantId": "your-tenant-id",
47 "workspaceIds": [
48 "workspaceIds"
49 ]
50}