POST /v2/kubernetes/clusters
To create a new Kubernetes cluster, send a POST request to
/v2/kubernetes/clusters
. The request must contain at least one node pool
with at least one worker.
The request may contain a maintenance window policy describing a time period when disruptive maintenance tasks may be carried out. Omitting the policy implies that a window will be chosen automatically. See here for details.
Servers
- https://api.digitalocean.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
vpc_uuid |
String | No |
A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned. |
region |
String | Yes |
The slug identifier for the region where the Kubernetes cluster is located. |
cluster_autoscaler_configuration |
Object | No |
An object specifying custom cluster autoscaler configuration. |
cluster_autoscaler_configuration.scale_down_utilization_threshold |
Number | No |
Used to customize when cluster autoscaler scales down non-empty nodes by setting the node utilization threshold. |
cluster_autoscaler_configuration.scale_down_unneeded_time |
String | No |
Used to customize how long a node is unneeded before being scaled down. |
routing_agent |
Object | No |
An object specifying whether the routing-agent component should be enabled for the Kubernetes cluster. |
routing_agent.enabled |
Boolean | No |
Indicates whether the routing-agent component is enabled. |
cluster_subnet |
String | No |
The range of IP addresses for the overlay network of the Kubernetes cluster in CIDR notation. |
control_plane_firewall |
Object | No |
An object specifying the control plane firewall for the Kubernetes cluster. Control plane firewall is in early availability (invite only). |
control_plane_firewall.allowed_addresses[] |
Array | No |
An array of public addresses (IPv4 or CIDR) allowed to access the control plane. |
control_plane_firewall.enabled |
Boolean | No |
Indicates whether the control plane firewall is enabled. |
status |
Object | No |
An object containing a |
status.message |
String | No |
An optional message providing additional information about the current cluster state. |
status.state |
String | No |
A string indicating the current status of the cluster. Possible values:
|
ipv4 |
String | No |
The public IPv4 address of the Kubernetes master node. This will not be set if high availability is configured on the cluster (v1.21+) |
endpoint |
String | No |
The base URL of the API server on the Kubernetes master node. |
registry_enabled |
Boolean | No |
A read-only boolean value indicating if a container registry is integrated with the cluster. |
service_subnet |
String | No |
The range of assignable IP addresses for services running in the Kubernetes cluster in CIDR notation. |
maintenance_policy |
Object | No |
An object specifying the maintenance window policy for the Kubernetes cluster. |
maintenance_policy.day |
String | No |
The day of the maintenance window policy. May be one of Possible values:
|
maintenance_policy.start_time |
String | No |
The start time in UTC of the maintenance window policy in 24-hour clock format / HH:MM notation (e.g., |
maintenance_policy.duration |
String | No |
The duration of the maintenance window policy in human-readable format. |
ha |
Boolean | No |
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. Default value: false |
node_pools[] |
Array | Yes |
An object specifying the details of the worker nodes available to the Kubernetes cluster. |
node_pools[].id |
String | No |
A unique ID that can be used to identify and reference a specific node pool. |
node_pools[].size |
String | Yes |
The slug identifier for the type of Droplet used as workers in the node pool. |
node_pools[].name |
String | Yes |
A human-readable name for the node pool. |
node_pools[].count |
Integer | Yes |
The number of Droplet instances in the node pool. |
node_pools[].min_nodes |
Integer | No |
The minimum number of nodes that this node pool can be auto-scaled to. The value will be |
node_pools[].labels |
Object | No |
An object of key/value mappings specifying labels to apply to all nodes in a pool. Labels will automatically be applied to all existing nodes and any subsequent nodes added to the pool. Note that when a label is removed, it is not deleted from the nodes in the pool. |
node_pools[].max_nodes |
Integer | No |
The maximum number of nodes that this node pool can be auto-scaled to. The value will be |
node_pools[].nodes[] |
Array | No |
An object specifying the details of a specific worker node in a node pool. |
node_pools[].nodes[].id |
String | No |
A unique ID that can be used to identify and reference the node. |
node_pools[].nodes[].name |
String | No |
An automatically generated, human-readable name for the node. |
node_pools[].nodes[].droplet_id |
String | No |
The ID of the Droplet used for the worker node. |
node_pools[].nodes[].status |
Object | No |
An object containing a |
node_pools[].nodes[].status.state |
String | No |
A string indicating the current status of the node. Possible values:
|
node_pools[].nodes[].created_at |
String | No |
A time value given in ISO8601 combined date and time format that represents when the node was created. |
node_pools[].nodes[].updated_at |
String | No |
A time value given in ISO8601 combined date and time format that represents when the node was last updated. |
node_pools[].tags[] |
Array | No |
An array containing the tags applied to the node pool. All node pools are automatically tagged |
node_pools[].auto_scale |
Boolean | No |
A boolean value indicating whether auto-scaling is enabled for this node pool. |
node_pools[].taints[] |
Array | No |
An array of taints to apply to all nodes in a pool. Taints will automatically be applied to all existing nodes and any subsequent nodes added to the pool. When a taint is removed, it is deleted from all nodes in the pool. |
node_pools[].taints[].effect |
String | No |
How the node reacts to pods that it won't tolerate. Available effect values are Possible values:
|
node_pools[].taints[].key |
String | No |
An arbitrary string. The |
node_pools[].taints[].value |
String | No |
An arbitrary string. The |
updated_at |
String | No |
A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. |
id |
String | No |
A unique ID that can be used to identify and reference a Kubernetes cluster. |
auto_upgrade |
Boolean | No |
A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. Default value: false |
name |
String | Yes |
A human-readable name for a Kubernetes cluster. |
version |
String | Yes |
The slug identifier for the version of Kubernetes used for the cluster. If set to a minor version (e.g. "1.14"), the latest version within it will be used (e.g. "1.14.6-do.1"); if set to "latest", the latest published version will be used. See the |
tags[] |
Array | No |
An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged |
surge_upgrade |
Boolean | No |
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 value: false |
created_at |
String | No |
A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.