pydo.kubernetes.update_cluster()
Generated on 3 Aug 2026
from pydo version
v0.40.0
Usage
client.kubernetes.update_cluster(
cluster_id="bd5f5959-5e1e-4205-a714-a914373942af",
body={
"name": "prod-cluster-01",
"tags": [...],
"maintenance_policy": {...},
...,
},
)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
cluster_idstring requiredA unique ID that can be used to reference a Kubernetes cluster.
namestring requiredExample:
prod-cluster-01A human-readable name for a Kubernetes cluster.
tagsarray of strings optionalExample:
['k8s', 'k8s:bd5f5959-5e1e-4205-a714-a914373942af', 'production', 'web-team']An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged
k8sandk8s:$K8S_CLUSTER_ID.maintenance_policyobject or null optionalAn object specifying the maintenance window policy for the Kubernetes cluster.
Show child properties
start_timestring optionalExample:
12:00The start time in UTC of the maintenance window policy in 24-hour clock format / HH:MM notation (e.g.,
15:00).durationstring optional read-onlyExample:
4h0m0sThe duration of the maintenance window policy in human-readable format.
daystring optionalThe day of the maintenance window policy. May be one of
mondaythroughsunday, oranyto indicate an arbitrary week day.
auto_upgradeboolean optionalExample:
TrueA boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.
surge_upgradeboolean optionalExample:
TrueA 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.
haboolean optionalExample:
TrueA 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.
control_plane_firewallobject or null optionalAn object specifying the control plane firewall for the Kubernetes cluster. Control plane firewall is in early availability (invite only).
Show child properties
enabledboolean optionalExample:
TrueIndicates whether the control plane firewall is enabled.
allowed_addressesarray of strings optionalExample:
['1.2.3.4/32', '1.1.0.0/16']An array of public addresses (IPv4 or CIDR) allowed to access the control plane.
cluster_autoscaler_configurationobject or null optionalAn object specifying custom cluster autoscaler configuration.
Show child properties
scale_down_utilization_thresholdnumber optionalExample:
0.65Used to customize when cluster autoscaler scales down non-empty nodes by setting the node utilization threshold.
scale_down_unneeded_timestring optionalExample:
1m0sUsed to customize how long a node is unneeded before being scaled down.
expandersarray of strings optionalExample:
['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 expanderrandom.
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.
ssoobject or null optionalAn object specifying Single Sign-On (SSO) configuration for the Kubernetes cluster.
Show child properties
enabledboolean optionalExample:
TrueIndicates whether SSO authentication is enabled for the cluster.
requiredboolean optionalExample:
FalseIndicates whether any non-SSO forms of authentication are disallowed.
Can only be set totruewhenenabledistrue.issuer_urlstring optionalExample:
https://sso.example.comThe OIDC issuer URL for the identity provider. Required when
enabledistrue.client_idstring optionalExample:
doks-cluster-clientThe OIDC client ID registered with the identity provider. Required when
enabledistrue.
routing_agentobject or null optionalAn object specifying whether the routing-agent component should be enabled for the Kubernetes cluster.
Show child properties
enabledboolean optionalExample:
TrueIndicates whether the routing-agent component is enabled.
p2p_oci_registry_pluginobject or null optionalAn object specifying whether the Peer-to-peer OCI registry component should be enabled for the Kubernetes cluster.
Show child properties
enabledboolean optionalExample:
TrueIndicates whether the Peer-to-peer OCI registry component is enabled.
amd_gpu_device_pluginobject or null optionalAn 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
enabledboolean optionalExample:
TrueIndicates whether the AMD GPU Device Plugin is enabled.
amd_gpu_device_metrics_exporter_pluginobject or null optionalAn object specifying whether the AMD Device Metrics Exporter should be enabled in the Kubernetes cluster.
Show child properties
enabledboolean optionalExample:
TrueIndicates whether the AMD Device Metrics Exporter is enabled.
nvidia_gpu_device_pluginobject or null optionalAn 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
enabledboolean optionalExample:
TrueIndicates whether the Nvidia GPU Device Plugin is enabled.
rdma_shared_dev_pluginobject or null optionalAn object specifying whether the RDMA shared device plugin should be enabled in the Kubernetes cluster.
Show child properties
enabledboolean optionalExample:
TrueIndicates whether the RDMA shared device plugin is enabled.
coredns_autoscalerobject or null optionalAn object specifying whether the Cluster Proportional Autoscaler (CPA) add-on for CoreDNS should be enabled for the Kubernetes cluster.
Show child properties
enabledboolean optionalExample:
TrueIndicates whether the CoreDNS Cluster Proportional Autoscaler add-on is enabled.
Request Sample
Response Example
More Information
See /v2/kubernetes/clusters/{cluster_id} in the API reference for additional detail on responses, headers, parameters, and more.