Skip to main content

Create a Kubernetes cluster

POST 

/api/v1/clusters

Creates a new Kubernetes cluster managed by the specified cloud provider.

Request

Header Parameters

    X-API-KEY stringrequired

    APIKey

Body

required

cluster creation data

    approvalWorkflow booleanrequired

    approvalWorkflow is the flag to enable the approval workflow for the cluster if the flag is set to true then notification field is required

    clusterName stringrequired

    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

    property name* string
    machineTypes string[]required

    machineTypes List of machine types for the control plane nodes

    maxNode integer

    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 integer

    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

    name stringrequired

    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

  • Array [

  • availabilityZones string[]

    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

    instanceType stringrequired

    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

    property name* string
    machineTypes string[]required

    list of machine types for the nodes in this group

    maxNode integerrequired

    maximum number of nodes in the group

    minNode integerrequired

    minimum number of nodes in the group

    name stringrequired

    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

  • Array [

  • effect string

    Possible values: [NoSchedule, PreferNoSchedule, NoExecute]

    effect indicates the taint effect to match can be NoSchedule, PreferNoSchedule or NoExecute

    key stringrequired

    Possible values: non-empty

    key is the taint key that the toleration applies to

    operator string

    Possible values: [Equal, Exists, NotExist, NotEqual]

    operator represents a key's relationship to the value Valid operators are Exists and Equal

    value stringrequired

    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 stringrequired

    receiver is the email address of the notification recipient

    slack

    object

    slack contains the Slack-specific notification configuration

    webhookURL stringrequired

    webhookURL is the Slack webhook URL for sending notifications

    type stringrequired

    Possible values: [slack, email]

    type is the type of notification (slack or email)

    provider stringrequired

    Possible values: [aws, azure, gcp]

    provisioner

    object

    required

    eks

    object

    EKS is the spec for the eks provisioner

    accountId stringrequired

    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

    property name* string
    type stringrequired

    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[]

  • Array [

  • cidr string
    id stringrequired

    Possible values: non-empty

    type stringrequired

    Possible values: [public, private]

  • ]

  • tags

    object

    property name* string
    vpcCIDR string
    vpcId string

    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.

    accountId stringrequired

    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 stringrequired

    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

    property name* string
    type stringrequired

    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 string

    networkId maps to the network id (vpc) in the cloud provider

    type stringrequired

    Possible values: [eks, selfHosted]

    Type is the type of the provisioner, the supported types are selfHosted and eks

    region stringrequired

    Possible values: non-empty

    region is the region for the cluster

Responses

cluster created

Schema

    data
    id string
    message string
    status string
Loading...