Create a Kubernetes cluster
POST/api/v1/clusters
Creates a new Kubernetes cluster managed by the specified cloud provider.
Request
Header Parameters
APIKey
- application/json
Body
required
cluster creation data
Array [
Array [
]
]
Array [
]
approvalWorkflow is the flag to enable the approval workflow for the cluster if the flag is set to true then notification field is required
Possible values: non-empty
and <= 50 characters
clusterName is the name of the cluster
clusterSpec
object
required
controlPlane
object
controlPlane is the configuration for the control plane
nodeGroup
object
required
labels
object
labels to be applied to the control plane nodes following the k8s label pattern
machineTypes List of machine types for the control plane nodes
maxMode Maximum number of nodes in the control plane node group The max node should be odd number. If not specified then the max node will be 1 Platform will create a node group per availability zone by default
minNode minimum number of nodes in the control plane node group The min node should be odd number. If not specified then the min node will be 1 Platform will create a node group per availability zone by default
Possible values: non-empty
and <= 50 characters
name of the control plane node group
dataPlane
object
required
dataPlane is the configuration for the data plane
nodeGroups
object[]
required
Possible values: >= 1
nodeGroups is a slice of NodeGroup configurations for the data plane It must contain at least one NodeGroup
availabilityZones is the list of availability zones If the list is empty then node group will be created in all the availability zones supported by the region and the provider
Possible values: [ondemand
, spot
]
instanceType is the type of the instance, The supported types are ondemand and spot
labels
object
labels to be applied to the nodes in this group
list of machine types for the nodes in this group
maximum number of nodes in the group
minimum number of nodes in the group
Possible values: non-empty
and <= 50 characters
name of the node group, must be a valid DNS name
taints
object[]
taints to be applied to the nodes in this group
Possible values: [NoSchedule
, PreferNoSchedule
, NoExecute
]
effect indicates the taint effect to match can be NoSchedule, PreferNoSchedule or NoExecute
Possible values: non-empty
key is the taint key that the toleration applies to
Possible values: [Equal
, Exists
, NotExist
, NotEqual
]
operator represents a key's relationship to the value Valid operators are Exists and Equal
Possible values: non-empty
value is the taint value the toleration matches to If the operator is Exists, the value should be empty
notification
object
email
object
email contains the email-specific notification configuration
receiver is the email address of the notification recipient
slack
object
slack contains the Slack-specific notification configuration
webhookURL is the Slack webhook URL for sending notifications
Possible values: [slack
, email
]
type is the type of notification (slack or email)
Possible values: [aws
, azure
, gcp
]
provisioner
object
required
eks
object
EKS is the spec for the eks provisioner
credentials
object
required
credentials maps to the cloud provider credentials you can use the env credentials or provide the credentials
data
object
required
data is the data for the credentials, the data is in the format of key-value pairs
Possible values: [static
, dynamic
]
type is the type of the credentials it expects, the supported types are static and dynamic if the type is static then platform aspects the standard ENV keys for cloud provider. Please follow the astro platform documentation for the keys. If the type is dynamic then the platform will use cloud provider supported capability to generate the credentials. Like for AWS it will use the STS assume role capability.
subnets
object
property name*
object[]
Possible values: non-empty
Possible values: [public
, private
]
tags
object
Possible values: non-empty
selfHosted
object
SelfHosted is the spec for the self-hosted provisioner. The astro platform will use the compute infrastructure of the supported provider to deploy a production-ready Kubernetes cluster.
Possible values: non-empty
accountId maps to the account id in the cloud provider for aws it is the account id for gcp it is the project id
bucketName maps to the bucket name in the cloud provider make sure the bucket is in the same region as the cluster
credentials
object
required
credentials maps to the cloud provider credentials you can use the env credentials or provide the credentials
data
object
required
data is the data for the credentials, the data is in the format of key-value pairs
Possible values: [static
, dynamic
]
type is the type of the credentials it expects, the supported types are static and dynamic if the type is static then platform aspects the standard ENV keys for cloud provider. Please follow the astro platform documentation for the keys. If the type is dynamic then the platform will use cloud provider supported capability to generate the credentials. Like for AWS it will use the STS assume role capability.
networkId maps to the network id (vpc) in the cloud provider
Possible values: [eks
, selfHosted
]
Type is the type of the provisioner, the supported types are selfHosted and eks
Possible values: non-empty
region is the region for the cluster
Responses
- 202
- 400
- 403
- 500
cluster created
- application/json
- Schema
- Example (from schema)
Schema
{
"data": {},
"id": "string",
"message": "string",
"status": "string"
}
invalid providerId
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string",
"error_code": "string"
}
forbidden to create a cluster. Only admin or platform-admin can create cluster.
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string",
"error_code": "string"
}
internal server error
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string",
"error_code": "string"
}