dots.v2.kubernetes.clusters.byCluster_id().put()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.kubernetes.clusters.byCluster_id(cluster_id).put(body: Cluster_update, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | WithCluster_PutResponse>

Description

To update a Kubernetes cluster, send a PUT request to /v2/kubernetes/clusters/{cluster_id} and specify one or more of the attributes below.

Parameters

Path Parameters

cluster_id string required

Example: bd5f5959-5e1e-4205-a714-a914373942af

A unique ID that can be used to reference a Kubernetes cluster.

Min: 1

Request Body

name string required

Example: prod-cluster-01

A human-readable name for a Kubernetes cluster.

tags array of strings optional

Example: ["k8s", "k8s:bd5f5959-5e1e-4205-a714-a914373942af", "production", "web-team"]

An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged k8s and k8s:$K8S_CLUSTER_ID.

maintenancePolicy object or null optional

An object specifying the maintenance window policy for the Kubernetes cluster.

Show child properties
startTime string optional

Example: 12:00

The start time in UTC of the maintenance window policy in 24-hour clock format / HH:MM notation (e.g., 15:00).

duration string optional read-only

Example: 4h0m0s

The duration of the maintenance window policy in human-readable format.

day string optional

The day of the maintenance window policy. May be one of monday through sunday, or any to indicate an arbitrary week day.

One of: any, monday, tuesday, wednesday, thursday, friday, saturday, sunday

autoUpgrade boolean optional

Example: true

A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.

Default: false

surgeUpgrade boolean optional

Example: true

A boolean value indicating whether surge upgrade is enabled/disabled for the cluster. Surge upgrade makes cluster upgrades fast and reliable by bringing up new nodes before destroying the outdated nodes.

Default: false

ha boolean optional

Example: true

A boolean value indicating whether the control plane is run in a highly available configuration in the cluster. Highly available control planes incur less downtime. The property cannot be disabled. When omitted on create, the default is version-dependent; for DOKS 1.36.0 and later, the default is true; for earlier versions, the default is false.

gpuOperatorReady boolean optional

Example: false

A boolean value indicating whether GPU nodes in the cluster are launched with images that do not include pre-installed GPU drivers, allowing GPU drivers to be managed by a GPU operator instead. Mutually exclusive with other GPU-related cluster options, such as nvidia_gpu_dra_driver and amd_gpu_dra_driver. When omitted, the current value is left unchanged.

controlPlaneFirewall object or null optional

An object specifying the control plane firewall for the Kubernetes cluster. Control plane firewall is in early availability (invite only).

Show child properties
enabled boolean optional

Example: true

Indicates whether the control plane firewall is enabled.

allowedAddresses array of strings optional

Example: ["1.2.3.4/32", "1.1.0.0/16"]

An array of public addresses (IPv4 or CIDR) allowed to access the control plane.

clusterAutoscalerConfiguration object or null optional

An object specifying custom cluster autoscaler configuration.

Show child properties
scaleDownUtilizationThreshold number optional

Example: 0.65

Used to customize when cluster autoscaler scales down non-empty nodes by setting the node utilization threshold.

scaleDownUnneededTime string optional

Example: 1m0s

Used to customize how long a node is unneeded before being scaled down.

expanders array of strings optional

Example: ["priority", "random"]

Customizes expanders used by cluster-autoscaler.
The autoscaler will apply each expander from the provided list to narrow down the selection of node types created to scale up,
until either a single node type is left, or the list of expanders is exhausted.
If this flag is unset, autoscaler will use its default expander random.
Passing an empty list (_not_ null) will unset any previous expander customizations.

Available expanders:
- random: Randomly selects a node group to scale.
- priority: Selects the node group with the highest priority as per user-provided configuration
- least_waste: Selects the node group that will result in the least amount of idle resources.

sso object or null optional

An object specifying Single Sign-On (SSO) configuration for the Kubernetes cluster.

Show child properties
enabled boolean optional

Example: true

Indicates whether SSO authentication is enabled for the cluster.

Default: false

required boolean optional

Example: false

Indicates whether any non-SSO forms of authentication are disallowed.
Can only be set to true when enabled is
true.

Default: false

issuerUrl string optional

Example: https://sso.example.com

The OIDC issuer URL for the identity provider. Required when enabled is
true.

clientId string optional

Example: doks-cluster-client

The OIDC client ID registered with the identity provider. Required when
enabled is true.

routingAgent object or null optional

An object specifying whether the routing-agent component should be enabled for the Kubernetes cluster.

Show child properties
enabled boolean optional

Example: true

Indicates whether the routing-agent component is enabled.

p2pOciRegistryPlugin object or null optional

An object specifying whether the Peer-to-peer OCI registry component should be enabled for the Kubernetes cluster.

Show child properties
enabled boolean optional

Example: true

Indicates whether the Peer-to-peer OCI registry component is enabled.

nfsCsiPlugin object or null optional

An object specifying whether the NFS CSI plugin should be enabled for the Kubernetes cluster.

Show child properties
enabled boolean optional

Example: true

Indicates whether the NFS CSI plugin is enabled.

amdGpuDevicePlugin object or null optional

An object specifying whether the AMD GPU Device Plugin should be enabled in the Kubernetes cluster. It's enabled by default for clusters with an AMD GPU node pool.

Show child properties
enabled boolean optional

Example: true

Indicates whether the AMD GPU Device Plugin is enabled.

amdGpuDeviceMetricsExporterPlugin object or null optional

An object specifying whether the AMD Device Metrics Exporter should be enabled in the Kubernetes cluster.

Show child properties
enabled boolean optional

Example: true

Indicates whether the AMD Device Metrics Exporter is enabled.

nvidiaGpuDevicePlugin object or null optional

An object specifying whether the Nvidia GPU Device Plugin should be enabled in the Kubernetes cluster. It's enabled by default for clusters with an Nvidia GPU node pool.

Show child properties
enabled boolean optional

Example: true

Indicates whether the Nvidia GPU Device Plugin is enabled.

nvidiaGpuDraDriver object or null optional

An object specifying whether the NVIDIA GPU DRA Driver should be enabled in the Kubernetes cluster. Mutually exclusive with nvidia_gpu_device_plugin.

Show child properties
enabled boolean optional

Example: true

Indicates whether the NVIDIA GPU DRA Driver is enabled.

amdGpuDraDriver object or null optional

An object specifying whether the AMD GPU DRA Driver should be enabled in the Kubernetes cluster. Mutually exclusive with amd_gpu_device_plugin.

Show child properties
enabled boolean optional

Example: true

Indicates whether the AMD GPU DRA Driver is enabled.

rdmaSharedDevPlugin object or null optional

An object specifying whether the RDMA shared device plugin should be enabled in the Kubernetes cluster.

Show child properties
enabled boolean optional

Example: true

Indicates whether the RDMA shared device plugin is enabled.

corednsAutoscaler object or null optional

An object specifying whether the Cluster Proportional Autoscaler (CPA) add-on for CoreDNS should be enabled for the Kubernetes cluster.

Show child properties
enabled boolean optional

Example: true

Indicates whether the CoreDNS Cluster Proportional Autoscaler add-on is enabled.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.kubernetes.clusters
    .byCluster_id("bd5f5959-5e1e-4205-a714-a914373942af").put({
    name: "prod-cluster-01",
    tags: [
        "k8s",
        "k8s:bd5f5959-5e1e-4205-a714-a914373942af",
        "production",
        "web-team",
    ],
    maintenancePolicy: {
        startTime: "12:00",
        day: "any",
    },
    autoUpgrade: true,
    surgeUpgrade: true,
    ha: true,
    gpuOperatorReady: false,
    controlPlaneFirewall: {
        enabled: true,
        allowedAddresses: [
            "1.2.3.4/32",
            "1.1.0.0/16",
        ],
    },
    clusterAutoscalerConfiguration: {
        scaleDownUtilizationThreshold: 0.65,
        scaleDownUnneededTime: "1m0s",
        expanders: [
            "priority",
            "random",
        ],
    },
    sso: {
        enabled: true,
        required: false,
        issuerUrl: "https://sso.example.com",
        clientId: "doks-cluster-client",
    },
    routingAgent: {
        enabled: true,
    },
    p2pOciRegistryPlugin: {
        enabled: true,
    },
    nfsCsiPlugin: {
        enabled: true,
    },
    amdGpuDevicePlugin: {
        enabled: true,
    },
    amdGpuDeviceMetricsExporterPlugin: {
        enabled: true,
    },
    nvidiaGpuDevicePlugin: {
        enabled: true,
    },
    nvidiaGpuDraDriver: {
        enabled: true,
    },
    amdGpuDraDriver: {
        enabled: true,
    },
    rdmaSharedDevPlugin: {
        enabled: true,
    },
    corednsAutoscaler: {
        enabled: true,
    },
});

Response Example

Show Response Example
{
  "kubernetes_cluster": {
    "id": "bd5f5959-5e1e-4205-a714-a914373942af",
    "name": "prod-cluster-01",
    "region": "nyc1",
    "version": "1.18.6-do.0",
    "cluster_subnet": "10.244.0.0/16",
    "service_subnet": "10.245.0.0/16",
    "vpc_uuid": "c33931f2-a26a-4e61-b85c-4e95a2ec431b",
    "ipv4": "68.183.121.157",
    "endpoint": "https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com",
    "tags": [
      "production",
      "web-team",
      "k8s",
      "k8s:bd5f5959-5e1e-4205-a714-a914373942af"
    ],
    "node_pools": [
      {
        "id": "cdda885e-7663-40c8-bc74-3a036c66545d",
        "name": "frontend-pool",
        "size": "s-1vcpu-2gb",
        "count": 3,
        "tags": [
          "production",
          "web-team",
          "k8s",
          "k8s:bd5f5959-5e1e-4205-a714-a914373942af",
          "k8s:worker"
        ],
        "labels": null,
        "taints": [],
        "auto_scale": false,
        "min_nodes": 0,
        "max_nodes": 0,
        "nodes": [
          {
            "id": "478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f",
            "name": "adoring-newton-3niq",
            "status": {
              "state": "running"
            },
            "droplet_id": "205545370",
            "created_at": "2018-11-15T16:00:11Z",
            "updated_at": "2018-11-15T16:00:11Z"
          },
          {
            "id": "ad12e744-c2a9-473d-8aa9-be5680500eb1",
            "name": "adoring-newton-3nim",
            "status": {
              "state": "running"
            },
            "droplet_id": "205545371",
            "created_at": "2018-11-15T16:00:11Z",
            "updated_at": "2018-11-15T16:00:11Z"
          },
          {
            "id": "e46e8d07-f58f-4ff1-9737-97246364400e",
            "name": "adoring-newton-3ni7",
            "status": {
              "state": "running"
            },
            "droplet_id": "205545372",
            "created_at": "2018-11-15T16:00:11Z",
            "updated_at": "2018-11-15T16:00:11Z"
          }
        ]
      },
      {
        "id": "f49f4379-7e7f-4af5-aeb6-0354bd840778",
        "name": "backend-pool",
        "size": "g-4vcpu-16gb",
        "count": 2,
        "tags": [
          "production",
          "web-team",
          "k8s",
          "k8s:bd5f5959-5e1e-4205-a714-a914373942af",
          "k8s:worker"
        ],
        "labels": {
          "service": "backend",
          "priority": "high"
        },
        "taints": [],
        "auto_scale": true,
        "min_nodes": 2,
        "max_nodes": 5,
        "nodes": [
          {
            "id": "3385619f-8ec3-42ba-bb23-8d21b8ba7518",
            "name": "affectionate-nightingale-3nif",
            "status": {
              "state": "running"
            },
            "droplet_id": "205545373",
            "created_at": "2018-11-15T16:00:11Z",
            "updated_at": "2018-11-15T16:00:11Z"
          },
          {
            "id": "4b8f60ff-ba06-4523-a6a4-b8148244c7e6",
            "name": "affectionate-nightingale-3niy",
            "status": {
              "state": "running"
            },
            "droplet_id": "205545374",
            "created_at": "2018-11-15T16:00:11Z",
            "updated_at": "2018-11-15T16:00:11Z"
          }
        ]
      }
    ],
    "maintenance_policy": {
      "start_time": "00:00",
      "duration": "4h0m0s",
      "day": "any"
    },
    "auto_upgrade": true,
    "isolated_workers": false,
    "gpu_operator_ready": false,
    "status": {
      "state": "running"
    },
    "created_at": "2018-11-15T16:00:11Z",
    "updated_at": "2018-11-15T16:00:11Z",
    "surge_upgrade": true,
    "registry_enabled": false,
    "registries": [
      "registry-a",
      "registry-b"
    ],
    "ha": false,
    "control_plane_firewall": {
      "enabled": true,
      "allowed_addresses": [
        "1.2.3.4/32",
        "1.1.0.0/16"
      ]
    },
    "cluster_autoscaler_configuration": {
      "scale_down_utilization_threshold": 0.65,
      "scale_down_unneeded_time": "1m",
      "expanders": [
        "priority",
        "random"
      ]
    },
    "sso": {
      "enabled": true,
      "required": false,
      "issuer_url": "https://sso.example.com",
      "client_id": "doks-cluster-client"
    },
    "routing_agent": {
      "enabled": false
    },
    "amd_gpu_device_plugin": {
      "enabled": false
    },
    "amd_gpu_device_metrics_exporter_plugin": {
      "enabled": false
    },
    "nvidia_gpu_device_plugin": {
      "enabled": false
    },
    "nvidia_gpu_dra_driver": {
      "enabled": false
    },
    "amd_gpu_dra_driver": {
      "enabled": false
    },
    "rdma_shared_dev_plugin": {
      "enabled": false
    },
    "coredns_autoscaler": {
      "enabled": false
    },
    "p2p_oci_registry_plugin": {
      "enabled": false
    },
    "nfs_csi_plugin": {
      "enabled": false
    }
  }
}

More Information

See /v2/kubernetes/clusters/{cluster_id} in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.