---
title: "Delete Kubernetes cluster"
method: DELETE
path: "/v1/kubernetes/{kubernetesId}"
tags: ["Kubernetes clusters"]
---

# Delete Kubernetes cluster

`DELETE /v1/kubernetes/{kubernetesId}`

## Request

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

This method deletes an existing managed Kubernetes cluster. Deleting a cluster will result in the termination of all the worker nodes and the master node that was part of the cluster. All the data stored on the nodes, including the container images, logs, and application data, will also be lost.

## Path parameters

- `kubernetesId` integer, required

## Response `200`

Successful operation

- KubernetesDelete
  - `id` integer: Kubernetes cluster ID
  - `createdAt` string, date-time: Cluster creation date and time
  - `createdById` integer: ID of the user who created the cluster
  - `createdByName` string: Name of the user who created the cluster
  - `modifiedAt` string, date-time: Cluster last modification date and time
  - `modifiedByName` string: Name of the user who last modified the cluster
  - `modifiedById` integer: ID of the user who last modified the cluster
  - `name` string: Cluster name
  - `version` string: Kubernetes version
  - `deploymentLocation` string: Deployment location
  - `k8sConnectionType` 'direct_connect' | 'internet_connect': Kubernetes connection type
  - `domainName` string, nullable: Cluster domain name
  - `status` string: Cluster status
  - `controlPlaneStatus` 'CREATING' | 'ACTIVE' | 'UPDATING' | 'DEGRADED' | 'UNHEALTHY' | 'FAILED' | 'DESTRUCTION': Control plane status
  - `cost` object
    - `unit` string: Billing unit
    - `currency` string: Currency code
    - `price` number, double: Cost amount
  - `nodeGroups` object[]: List of cluster node groups
    - `name` string: Node group name
    - `nodes` object[]: List of nodes in the node group
      - `id` integer: Node ID
      - `createdAt` string, date-time: Node creation date and time
      - `name` string: Node name
      - `status` string: 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
        - `id` integer: Provider ID
        - `name` string: Provider name
      - `location` object
        - `id` integer: Location ID
        - `name` string: Location name
        - `country` string: Country
        - `continent` string: Continent
        - `region` string: Region
        - `latitude` number, double: Latitude
        - `longitude` number, double: Longitude
      - `dataCenter` object
        - `id` string: Data center ID
        - `name` string: Data center name
        - `providerName` string: Provider name
        - `providerId` integer: Provider ID
        - `locationId` integer: Location ID
        - `locationName` string: Location name
      - `os` object
        - `id` integer: Operating system ID
        - `family` string: OS family
        - `type` string: OS type
        - `architecture` string: OS architecture
        - `version` string: OS version
      - `cloudNetworkType` 'default' | 'multi-cloud': Cloud network type
      - `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
      - `disks` object[]: List of attached disks
        - `id` integer: Disk ID
        - `name` string: Disk name
        - `sizeGb` integer: Disk size in gigabytes
        - `typeId` integer: Disk type ID
        - `type` 'ssd' | 'ssd-plus': Disk type
        - `isBootable` boolean: Whether the disk is bootable
        - `deviceIdentifier` string, nullable: Device identifier of the volume as seen by the operating system
      - `networks` object[]: List of attached networks
        - `id` integer: Network ID
        - `ip` string, nullable: IP address. Null for nodes that have not yet received an IP address.
        - `networkTypeId` integer: Network type ID
        - `networkType` string: Network type
        - `ipVersion` string, nullable: IP version
      - `cost` object
        - `unit` string: Billing unit
        - `currency` string: Currency code
        - `price` number, double: Cost amount
      - `securityGroup` object, nullable
        - `id` integer: Security group ID
        - `name` string: Security group name
      - `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[]: Configurations of autoscaling groups
    - `groupName` string: Group name
    - `dataCenterId` string: 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: Target number of nodes. Required when using node-count based autoscaling. 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: Target number of vCPUs. Required when using vCPU-count based autoscaling. 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, double, nullable: Price limit of the autoscaling group
    - `useOnDemandInstancesInsteadOfSpots` boolean: Use on-demand compute instances instead of spot compute instances
    - `spotPercent` integer: Percentage of spot instances in the autoscaling group
    - `spotMarkup` number, double: 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[]: 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
    - `limitsNotice` string, nullable: Limits notice message

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `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)
