---
title: "Add autoscaling groups"
method: POST
path: "/v1/kubernetes/{kubernetesId}/groups"
tags: ["Kubernetes clusters"]
---

# Add autoscaling groups

`POST /v1/kubernetes/{kubernetesId}/groups`

## Request

- Base URL: `https://api.emma.ms/external`
- URL: `https://api.emma.ms/external/v1/kubernetes/{kubernetesId}/groups`
- Auth: HTTP bearer

Adds one or more autoscaling groups to an existing Managed Kubernetes cluster without a full cluster-update request. Existing groups and worker nodes are left untouched.

The cluster must be in "ACTIVE" status. The operation is asynchronous: the method returns 202 with the cluster payload and the groups' nodes are provisioned in the background.

## Path parameters

- `kubernetesId` integer, required

## Request body

- KubernetesGroupsAddRequest
  - `groups` KubernetesAutoscalingConfig[], required: Autoscaling groups to add to the cluster
    - `groupName` string, required: Group name
    - `dataCenterId` string, required: ID of the data center
    - `minimumNodes` integer: Minimum number of nodes. Required when using node-count based autoscaling. Must be null if `minimumVCpus` is set.
    - `maximumNodes` integer: Maximum number of nodes. Required when using node-count based autoscaling. Must be null if `maximumVCpus` is set.
    - `targetNodes` integer: Deprecated alias of minOnDemandCount (former desired total node count). Used only when minOnDemandCount is not provided. Must be null if `targetVCpus` is set.
    - `minimumVCpus` integer, nullable: Minimum number of vCPUs. Required when using vCPU-count based autoscaling. Must be null if `minimumNodes` is set.
    - `maximumVCpus` integer, nullable: Maximum number of vCPUs. Required when using vCPU-count based autoscaling. Must be null if `maximumNodes` is set.
    - `targetVCpus` integer, nullable: Deprecated alias of minOnDemandCount (former desired total vCPU count). Used only when minOnDemandCount is not provided. Must be null if `targetNodes` is set.
    - `minOnDemandCount` integer, nullable: Minimum guaranteed number of on-demand (non-spot) units in the group — nodes for node-count scaling, vCPUs for vCPU-count scaling. Allowed range is 0..maximum. It constrains the composition of the existing nodes, not the group size. Defaults to 0 (or to the deprecated target field when provided).
    - `nodeGroupPriceLimit` number: Price limit of the autoscaling group
    - `useOnDemandInstancesInsteadOfSpots` boolean, required: Use on-demand compute instances instead of spot compute instances
    - `spotPercent` integer: Percentage of spot instances in the autoscaling group
    - `spotMarkup` number: Extra markup to the spot instance price
    - `userLabels` object[], nullable: ASG label applied to nodes created by this autoscaling group
      - `key` string, required: ASG label key
      - `value` string, required: ASG label value
    - `configurationPriorities` object[], required: Compute instance configurations with priorities
      - `vCpuType` 'shared' | 'standard' | 'hpc': Type of the virtual Central Processing Unit (vCPU)
      - `vCpu` integer: Number of virtual Central Processing Units (vCPUs)
      - `ramGb` integer: Capacity of the RAM in gigabytes
      - `volumeGb` integer: Capacity of the volume in gigabytes
      - `volumeType` 'ssd' | 'ssd-plus': Volume type
      - `priority` 'high' | 'med' | 'low': Configuration priority

## Response `202`

Request accepted; the groups are being provisioned

- KubernetesUpdateResponse
  - `id` integer, required: Kubernetes cluster ID
  - `createdAt` string, date-time, required: Cluster creation date and time
  - `createdById` integer, required: ID of the user who created the cluster
  - `createdByName` string, required: Name of the user who created the cluster
  - `modifiedAt` string, date-time, required: Cluster last modification date and time
  - `modifiedByName` string, required: Name of the user who last modified the cluster
  - `modifiedById` integer, required: ID of the user who last modified the cluster
  - `name` string, required: Cluster name
  - `version` string, required: Kubernetes version
  - `deploymentLocation` string, required: Deployment location
  - `k8sConnectionType` 'direct_connect' | 'internet_connect', required: Kubernetes connection type
  - `domainName` string, nullable: Cluster domain name
  - `status` string, required: Cluster status
  - `controlPlaneStatus` 'CREATING' | 'ACTIVE' | 'UPDATING' | 'DEGRADED' | 'UNHEALTHY' | 'FAILED' | 'DESTRUCTION', required: Control plane status
  - `cost` object, required
    - `unit` string, required: Billing unit
    - `currency` string, required: Currency code
    - `price` number, double, required: Cost amount
  - `nodeGroups` object[], required: List of cluster node groups
    - `name` string, required: Node group name
    - `nodes` object[], required: List of nodes in the node group
      - `id` integer, required: Node ID
      - `createdAt` string, date-time, required: Node creation date and time
      - `name` string, required: Node name
      - `status` string, required: Node status
      - `instanceType` 'on_demand' | 'spot': How the node's VM was purchased. A `spot` node is cheaper, but the provider may reclaim it at any time and the platform then recreates it. Absent when the purchase mode cannot be resolved — read that as `on_demand`.
      - `nodeStatus` 'PROVISIONING' | 'JOINING' | 'ACTIVE' | 'PENDING' | 'DELETING' | 'FAILED': Worker node lifecycle status
      - `provider` object, required
        - `id` integer, required: Provider ID
        - `name` string, required: Provider name
      - `location` object, required
        - `id` integer, required: Location ID
        - `name` string, required: Location name
        - `country` string, required: Country
        - `continent` string, required: Continent
        - `region` string, required: Region
        - `latitude` number, double, required: Latitude
        - `longitude` number, double, required: Longitude
      - `dataCenter` object, required
        - `id` string, required: Data center ID
        - `name` string, required: Data center name
        - `providerName` string, required: Provider name
        - `providerId` integer, required: Provider ID
        - `locationId` integer, required: Location ID
        - `locationName` string, required: Location name
      - `os` object, required
        - `id` integer, required: Operating system ID
        - `family` string, required: OS family
        - `type` string, required: OS type
        - `architecture` string, required: OS architecture
        - `version` string, required: OS version
      - `cloudNetworkType` 'default' | 'multi-cloud', required: Cloud network type
      - `vCpuType` 'shared' | 'standard' | 'hpc', required: Type of the virtual Central Processing Unit (vCPU)
      - `vCpu` integer, required: Number of virtual Central Processing Units (vCPUs)
      - `ramGb` integer, required: Capacity of the RAM in gigabytes
      - `disks` object[], required: List of attached disks
        - `id` integer, required: Disk ID
        - `name` string, required: Disk name
        - `sizeGb` integer, required: Disk size in gigabytes
        - `typeId` integer, required: Disk type ID
        - `type` 'ssd' | 'ssd-plus', required: Disk type
        - `isBootable` boolean, required: Whether the disk is bootable
        - `deviceIdentifier` string, nullable: Device identifier of the volume as seen by the operating system
      - `networks` object[], nullable: List of attached networks
      - `cost` object, required
        - `unit` string, required: Billing unit
        - `currency` string, required: Currency code
        - `price` number, double, required: Cost amount
      - `securityGroup` object, nullable: Security group attached to the node
      - `accelerator` object, nullable: Accelerator attached to the node
      - `localDisks` object[], nullable: Local disks attached to the node
    - `status` 'CREATING' | 'ACTIVE' | 'SCALING_UP' | 'SCALING_DOWN' | 'READY' | 'UNHEALTHY' | 'DESTRUCTION', nullable: Node group (ASG) runtime status. Null for static (non-autoscaling) node groups.
    - `scalingPolicy` 'ENABLED' | 'SCALE_UP_ONLY' | 'SCALE_DOWN_ONLY' | 'DISABLED', nullable: Autoscaling policy applied to the node group. Null for static node groups.
  - `autoscalingConfigs` object[], required: Configurations of autoscaling groups
    - `groupName` string, required: Group name
    - `dataCenterId` string, required: ID of the data center
    - `minimumNodes` integer, required: Minimum number of nodes
    - `maximumNodes` integer, required: Maximum number of nodes
    - `targetNodes` integer, required: Target number of nodes
    - `minimumVCpus` integer, nullable: Minimum number of vCPUs. Required when using vCPU-count based autoscaling. Must be null if `minimumNodes` is set.
    - `maximumVCpus` integer, nullable: Maximum number of vCPUs. Required when using vCPU-count based autoscaling. Must be null if `maximumNodes` is set.
    - `targetVCpus` integer, nullable: Target number of vCPUs
    - `minOnDemandCount` integer, nullable: Minimum guaranteed number of on-demand (non-spot) units in the group — nodes for node-count scaling, vCPUs for vCPU-count scaling. Allowed range is 0..maximum. It constrains the composition of the existing nodes, not the group size. Defaults to 0 (or to the deprecated target field when provided).
    - `nodeGroupPriceLimit` number, double, nullable, required: Price limit of the autoscaling group
    - `useOnDemandInstancesInsteadOfSpots` boolean, required: Use on-demand compute instances instead of spot compute instances
    - `spotPercent` integer, required: Percentage of spot instances in the autoscaling group
    - `spotMarkup` number, double, required: Extra markup to the spot instance price
    - `userLabels` object[], nullable: ASG labels applied to nodes created by this autoscaling group
      - `key` string, required: ASG label key
      - `value` string, required: ASG label value. Required and non-nullable; empty string is allowed.
    - `configurationPriorities` object[], required: Compute instance configurations with priorities
      - `vCpuType` 'shared' | 'standard' | 'hpc', required: Type of the virtual Central Processing Unit (vCPU)
      - `vCpu` integer, required: Number of virtual Central Processing Units (vCPUs)
      - `ramGb` integer, required: Capacity of the RAM in gigabytes
      - `volumeGb` integer, required: Capacity of the volume in gigabytes
      - `volumeType` 'ssd' | 'ssd-plus', required: Volume type
      - `priority` 'high' | 'med' | 'low', required: Configuration priority
    - `limitsNotice` string, nullable: Limits notice message

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict
- `422`: Unprocessable entity
- `500`: Internal server error

---

[API](https://skmtc.dev/emma/apis/public-emma-api.md) - [All operations](https://skmtc.dev/emma/apis/public-emma-api/llms.txt) - [OpenAPI document](https://skmtc.dev/emma/apis/public-emma-api/revisions/9e55f0920078?raw)
