pub struct KubernetesCreateClusterBody {Show 31 fields
pub amd_gpu_device_metrics_exporter_plugin: Option<KubernetesCreateClusterBodyAmdGpuDeviceMetricsExporterPlugin>,
pub amd_gpu_device_plugin: Option<KubernetesCreateClusterBodyAmdGpuDevicePlugin>,
pub auto_upgrade: bool,
pub cluster_autoscaler_configuration: Option<KubernetesCreateClusterBodyClusterAutoscalerConfiguration>,
pub cluster_subnet: Option<String>,
pub control_plane_firewall: Option<KubernetesCreateClusterBodyControlPlaneFirewall>,
pub coredns_autoscaler: Option<KubernetesCreateClusterBodyCorednsAutoscaler>,
pub created_at: Option<DateTime<Utc>>,
pub endpoint: Option<String>,
pub ha: Option<bool>,
pub id: Option<Uuid>,
pub ipv4: Option<String>,
pub isolated_workers: bool,
pub maintenance_policy: Option<KubernetesCreateClusterBodyMaintenancePolicy>,
pub name: String,
pub node_pools: Vec<KubernetesCreateClusterBodyNodePoolsItem>,
pub nvidia_gpu_device_plugin: Option<KubernetesCreateClusterBodyNvidiaGpuDevicePlugin>,
pub p2p_oci_registry_plugin: Option<KubernetesCreateClusterBodyP2pOciRegistryPlugin>,
pub rdma_shared_dev_plugin: Option<KubernetesCreateClusterBodyRdmaSharedDevPlugin>,
pub region: String,
pub registry_enabled: Option<bool>,
pub routing_agent: Option<KubernetesCreateClusterBodyRoutingAgent>,
pub service_subnet: Option<String>,
pub sso: Option<KubernetesCreateClusterBodySso>,
pub status: Option<KubernetesCreateClusterBodyStatus>,
pub surge_upgrade: bool,
pub tags: Vec<String>,
pub updated_at: Option<DateTime<Utc>>,
pub version: String,
pub vpc_uuid: Option<Uuid>,
pub worker_subnet_uuid: Option<Uuid>,
}Expand description
KubernetesCreateClusterBody
JSON schema
{
"type": "object",
"required": [
"name",
"node_pools",
"region",
"version"
],
"properties": {
"amd_gpu_device_metrics_exporter_plugin": {
"description": "An object specifying whether the AMD Device Metrics Exporter should be enabled in the Kubernetes cluster.",
"type": [
"object",
"null"
],
"properties": {
"enabled": {
"description": "Indicates whether the AMD Device Metrics Exporter is enabled.",
"examples": [
true
],
"type": "boolean"
}
}
},
"amd_gpu_device_plugin": {
"description": "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.",
"type": [
"object",
"null"
],
"properties": {
"enabled": {
"description": "Indicates whether the AMD GPU Device Plugin is enabled.",
"examples": [
true
],
"type": "boolean"
}
}
},
"auto_upgrade": {
"description": "A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.",
"default": false,
"examples": [
true
],
"type": "boolean"
},
"cluster_autoscaler_configuration": {
"description": "An object specifying custom cluster autoscaler configuration.",
"type": [
"object",
"null"
],
"properties": {
"expanders": {
"description": "Customizes expanders used by cluster-autoscaler.\nThe autoscaler will apply each expander from the provided list to narrow down the selection of node types created to scale up,\nuntil either a single node type is left, or the list of expanders is exhausted.\nIf this flag is unset, autoscaler will use its default expander `random`.\nPassing an empty list (_not_ `null`) will unset any previous expander customizations.\n\nAvailable expanders:\n- `random`: Randomly selects a node group to scale.\n- `priority`: Selects the node group with the highest priority as per [user-provided configuration](https://docs.digitalocean.com/products/kubernetes/how-to/autoscale/#configuring-priority-expander)\n- `least_waste`: Selects the node group that will result in the least amount of idle resources.\n",
"examples": [
[
"priority",
"random"
]
],
"type": "array",
"items": {
"type": "string",
"enum": [
"random",
"priority",
"least_waste"
]
}
},
"scale_down_unneeded_time": {
"description": "Used to customize how long a node is unneeded before being scaled down.",
"examples": [
"1m0s"
],
"type": "string"
},
"scale_down_utilization_threshold": {
"description": "Used to customize when cluster autoscaler scales down non-empty nodes by setting the node utilization threshold.",
"examples": [
0.65
],
"type": "number"
}
}
},
"cluster_subnet": {
"description": "The range of IP addresses for the overlay network of the Kubernetes cluster in CIDR notation.",
"examples": [
"192.168.0.0/20"
],
"type": "string",
"format": "cidr"
},
"control_plane_firewall": {
"description": "An object specifying the control plane firewall for the Kubernetes cluster. Control plane firewall is in early availability (invite only).",
"type": [
"object",
"null"
],
"properties": {
"allowed_addresses": {
"description": "An array of public addresses (IPv4 or CIDR) allowed to access the control plane.",
"examples": [
[
"1.2.3.4/32",
"1.1.0.0/16"
]
],
"type": "array",
"items": {
"type": "string"
}
},
"enabled": {
"description": "Indicates whether the control plane firewall is enabled.",
"examples": [
true
],
"type": "boolean"
}
}
},
"coredns_autoscaler": {
"description": "An object specifying whether the Cluster Proportional Autoscaler (CPA) add-on for CoreDNS should be enabled for the Kubernetes cluster.",
"type": [
"object",
"null"
],
"properties": {
"enabled": {
"description": "Indicates whether the CoreDNS Cluster Proportional Autoscaler add-on is enabled.",
"examples": [
true
],
"type": "boolean"
}
}
},
"created_at": {
"description": "A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created.",
"readOnly": true,
"examples": [
"2018-11-15T16:00:11Z"
],
"type": "string",
"format": "date-time"
},
"endpoint": {
"description": "The base URL of the API server on the Kubernetes master node.",
"readOnly": true,
"examples": [
"https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com"
],
"type": "string"
},
"ha": {
"description": "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.",
"examples": [
true
],
"type": "boolean"
},
"id": {
"description": "A unique ID that can be used to identify and reference a Kubernetes cluster.",
"readOnly": true,
"examples": [
"bd5f5959-5e1e-4205-a714-a914373942af"
],
"type": "string",
"format": "uuid"
},
"ipv4": {
"description": "The public IPv4 address of the Kubernetes master node. This will not be set if high availability is configured on the cluster (v1.21+)",
"readOnly": true,
"examples": [
"68.183.121.157"
],
"type": "string"
},
"isolated_workers": {
"description": "A boolean value indicating whether worker nodes in the cluster are not assigned public IP addresses. When omitted on create, the default value is false. When enabled, a NAT gateway must exist in the VPC where the cluster is created.",
"default": false,
"examples": [
false
],
"type": "boolean"
},
"maintenance_policy": {
"description": "An object specifying the maintenance window policy for the Kubernetes cluster.",
"type": [
"object",
"null"
],
"properties": {
"day": {
"description": "The day of the maintenance window policy. May be one of `monday` through `sunday`, or `any` to indicate an arbitrary week day.",
"examples": [
"any"
],
"type": "string",
"enum": [
"any",
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday"
]
},
"duration": {
"description": "The duration of the maintenance window policy in human-readable format.",
"readOnly": true,
"examples": [
"4h0m0s"
],
"type": "string"
},
"start_time": {
"description": "The start time in UTC of the maintenance window policy in 24-hour clock format / HH:MM notation (e.g., `15:00`).",
"examples": [
"12:00"
],
"type": "string"
}
}
},
"name": {
"description": "A human-readable name for a Kubernetes cluster.",
"examples": [
"prod-cluster-01"
],
"type": "string"
},
"node_pools": {
"description": "An object specifying the details of the worker nodes available to the Kubernetes cluster.",
"type": "array",
"items": {
"type": "object",
"allOf": [
{
"type": "object",
"properties": {
"size": {
"description": "The slug identifier for the type of Droplet used as workers in the node pool.",
"examples": [
"s-1vcpu-2gb"
],
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"auto_scale": {
"description": "A boolean value indicating whether auto-scaling is enabled for this node pool.",
"examples": [
true
],
"type": "boolean"
},
"count": {
"description": "The number of Droplet instances in the node pool.",
"examples": [
3
],
"type": "integer"
},
"id": {
"description": "A unique ID that can be used to identify and reference a specific node pool.",
"readOnly": true,
"examples": [
"cdda885e-7663-40c8-bc74-3a036c66545d"
],
"type": "string",
"format": "uuid"
},
"labels": {
"description": "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.",
"type": [
"object",
"null"
]
},
"max_nodes": {
"description": "The maximum number of nodes that this node pool can be auto-scaled to. The value will be `0` if `auto_scale` is set to `false`.",
"examples": [
6
],
"type": "integer"
},
"min_nodes": {
"description": "The minimum number of nodes that this node pool can be auto-scaled to. The value will be `0` if `auto_scale` is set to `false`.",
"examples": [
3
],
"type": "integer"
},
"name": {
"description": "A human-readable name for the node pool.",
"examples": [
"frontend-pool"
],
"type": "string"
},
"nodes": {
"description": "An object specifying the details of a specific worker node in a node pool.",
"readOnly": true,
"type": "array",
"items": {
"description": "Fallback schema for missing file reference",
"type": "object",
"additionalProperties": true
}
},
"tags": {
"description": "An array containing the tags applied to the node pool. All node pools are automatically tagged `k8s`, `k8s-worker`, and `k8s:$K8S_CLUSTER_ID`. <br><br>Requires `tag:read` scope.",
"examples": [
[
"k8s",
"k8s:bd5f5959-5e1e-4205-a714-a914373942af",
"k8s-worker",
"production",
"web-team"
]
],
"type": "array",
"items": {
"type": "string"
}
},
"taints": {
"description": "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.",
"type": "array",
"items": {
"type": "object",
"required": [
"effect",
"key"
],
"properties": {
"effect": {
"description": "The taint effect",
"examples": [
"NoSchedule"
],
"type": "string",
"enum": [
"NoSchedule",
"PreferNoSchedule",
"NoExecute"
]
},
"key": {
"description": "The taint key",
"examples": [
"node.kubernetes.io/example-key"
],
"type": "string"
},
"value": {
"description": "The taint value",
"examples": [
"example-value"
],
"type": "string"
}
}
}
}
}
}
],
"required": [
"count",
"name",
"size"
]
}
},
"nvidia_gpu_device_plugin": {
"description": "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.",
"type": [
"object",
"null"
],
"properties": {
"enabled": {
"description": "Indicates whether the Nvidia GPU Device Plugin is enabled.",
"examples": [
true
],
"type": "boolean"
}
}
},
"p2p_oci_registry_plugin": {
"description": "An object specifying whether the Peer-to-peer OCI registry component should be enabled for the Kubernetes cluster.",
"type": [
"object",
"null"
],
"properties": {
"enabled": {
"description": "Indicates whether the Peer-to-peer OCI registry component is enabled.",
"examples": [
true
],
"type": "boolean"
}
}
},
"rdma_shared_dev_plugin": {
"description": "An object specifying whether the RDMA shared device plugin should be enabled in the Kubernetes cluster.",
"type": [
"object",
"null"
],
"properties": {
"enabled": {
"description": "Indicates whether the RDMA shared device plugin is enabled.",
"examples": [
true
],
"type": "boolean"
}
}
},
"region": {
"description": "The slug identifier for the region where the Kubernetes cluster is located.",
"examples": [
"nyc1"
],
"type": "string"
},
"registry_enabled": {
"description": "A read-only boolean value indicating if a container registry is integrated with the cluster.",
"readOnly": true,
"examples": [
true
],
"type": "boolean"
},
"routing_agent": {
"description": "An object specifying whether the routing-agent component should be enabled for the Kubernetes cluster.",
"type": [
"object",
"null"
],
"properties": {
"enabled": {
"description": "Indicates whether the routing-agent component is enabled.",
"examples": [
true
],
"type": "boolean"
}
}
},
"service_subnet": {
"description": "The range of assignable IP addresses for services running in the Kubernetes cluster in CIDR notation.",
"examples": [
"192.168.16.0/24"
],
"type": "string",
"format": "cidr"
},
"sso": {
"description": "An object specifying Single Sign-On (SSO) configuration for the Kubernetes cluster.",
"type": [
"object",
"null"
],
"properties": {
"client_id": {
"description": "The OIDC client ID registered with the identity provider. Required when\n`enabled` is `true`.\n",
"examples": [
"doks-cluster-client"
],
"type": "string"
},
"enabled": {
"description": "Indicates whether SSO authentication is enabled for the cluster.",
"default": false,
"examples": [
true
],
"type": "boolean"
},
"issuer_url": {
"description": "The OIDC issuer URL for the identity provider. Required when `enabled` is\n`true`.\n",
"examples": [
"https://sso.example.com"
],
"type": "string",
"format": "uri"
},
"required": {
"description": "Indicates whether any non-SSO forms of authentication are disallowed.\nCan only be set to `true` when `enabled` is\n`true`.\n",
"default": false,
"examples": [
false
],
"type": "boolean"
}
}
},
"status": {
"description": "An object containing a `state` attribute whose value is set to a string indicating the current status of the cluster.",
"readOnly": true,
"type": "object",
"properties": {
"message": {
"description": "An optional message providing additional information about the current cluster state.",
"examples": [
"provisioning"
],
"type": "string"
},
"state": {
"description": "A string indicating the current status of the cluster.",
"examples": [
"provisioning"
],
"type": "string",
"enum": [
"running",
"provisioning",
"degraded",
"error",
"deleted",
"upgrading",
"deleting"
]
}
}
},
"surge_upgrade": {
"description": "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,
"examples": [
true
],
"type": "boolean"
},
"tags": {
"description": "An array of tags to apply to the Kubernetes cluster. All clusters are automatically tagged `k8s` and `k8s:$K8S_CLUSTER_ID`. <br><br>Requires `tag:read` and `tag:create` scope, as well as `tag:delete` if existing tags are getting removed.",
"examples": [
[
"k8s",
"k8s:bd5f5959-5e1e-4205-a714-a914373942af",
"production",
"web-team"
]
],
"type": "array",
"items": {
"type": "string"
}
},
"updated_at": {
"description": "A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated.",
"readOnly": true,
"examples": [
"2018-11-15T16:00:11Z"
],
"type": "string",
"format": "date-time"
},
"version": {
"description": "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 `/v2/kubernetes/options` endpoint to find all currently available versions.",
"examples": [
"1.18.6-do.0"
],
"type": "string"
},
"vpc_uuid": {
"description": "A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.<br><br>Requires `vpc:read` scope.",
"examples": [
"c33931f2-a26a-4e61-b85c-4e95a2ec431b"
],
"type": "string",
"format": "uuid"
},
"worker_subnet_uuid": {
"description": "The UUID of the VPC subnet to attach worker nodes to. When omitted on\ncreate, the default subnet for the VPC is used. This value cannot be changed\nafter the cluster is created.\n\n`vpc_uuid` must also be set.\n<br><br>Requires `vpc:read` scope.\n",
"examples": [
"cbd79771-23eb-49be-b5ea-59cc56222622"
],
"type": "string",
"format": "uuid"
}
}
}Fields§
§amd_gpu_device_metrics_exporter_plugin: Option<KubernetesCreateClusterBodyAmdGpuDeviceMetricsExporterPlugin>An object specifying whether the AMD Device Metrics Exporter should be enabled in the Kubernetes cluster.
amd_gpu_device_plugin: Option<KubernetesCreateClusterBodyAmdGpuDevicePlugin>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.
auto_upgrade: boolA boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window.
cluster_autoscaler_configuration: Option<KubernetesCreateClusterBodyClusterAutoscalerConfiguration>An object specifying custom cluster autoscaler configuration.
cluster_subnet: Option<String>The range of IP addresses for the overlay network of the Kubernetes cluster in CIDR notation.
control_plane_firewall: Option<KubernetesCreateClusterBodyControlPlaneFirewall>An object specifying the control plane firewall for the Kubernetes cluster. Control plane firewall is in early availability (invite only).
coredns_autoscaler: Option<KubernetesCreateClusterBodyCorednsAutoscaler>An object specifying whether the Cluster Proportional Autoscaler (CPA) add-on for CoreDNS should be enabled for the Kubernetes cluster.
created_at: Option<DateTime<Utc>>A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created.
endpoint: Option<String>The base URL of the API server on the Kubernetes master node.
ha: Option<bool>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.
id: Option<Uuid>A unique ID that can be used to identify and reference a Kubernetes cluster.
ipv4: Option<String>The public IPv4 address of the Kubernetes master node. This will not be set if high availability is configured on the cluster (v1.21+)
isolated_workers: boolA boolean value indicating whether worker nodes in the cluster are not assigned public IP addresses. When omitted on create, the default value is false. When enabled, a NAT gateway must exist in the VPC where the cluster is created.
maintenance_policy: Option<KubernetesCreateClusterBodyMaintenancePolicy>An object specifying the maintenance window policy for the Kubernetes cluster.
name: StringA human-readable name for a Kubernetes cluster.
node_pools: Vec<KubernetesCreateClusterBodyNodePoolsItem>An object specifying the details of the worker nodes available to the Kubernetes cluster.
nvidia_gpu_device_plugin: Option<KubernetesCreateClusterBodyNvidiaGpuDevicePlugin>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.
p2p_oci_registry_plugin: Option<KubernetesCreateClusterBodyP2pOciRegistryPlugin>An object specifying whether the Peer-to-peer OCI registry component should be enabled for the Kubernetes cluster.
An object specifying whether the RDMA shared device plugin should be enabled in the Kubernetes cluster.
region: StringThe slug identifier for the region where the Kubernetes cluster is located.
registry_enabled: Option<bool>A read-only boolean value indicating if a container registry is integrated with the cluster.
routing_agent: Option<KubernetesCreateClusterBodyRoutingAgent>An object specifying whether the routing-agent component should be enabled for the Kubernetes cluster.
service_subnet: Option<String>The range of assignable IP addresses for services running in the Kubernetes cluster in CIDR notation.
sso: Option<KubernetesCreateClusterBodySso>An object specifying Single Sign-On (SSO) configuration for the Kubernetes cluster.
status: Option<KubernetesCreateClusterBodyStatus>§surge_upgrade: boolA 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.
An array of tags to apply to the Kubernetes cluster. All clusters are automatically tagged k8s and k8s:$K8S_CLUSTER_ID.
Requires tag:read and tag:create scope, as well as tag:delete if existing tags are getting removed.
updated_at: Option<DateTime<Utc>>A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated.
version: StringThe 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 /v2/kubernetes/options endpoint to find all currently available versions.
vpc_uuid: Option<Uuid>A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned.
Requires vpc:read scope.
worker_subnet_uuid: Option<Uuid>The UUID of the VPC subnet to attach worker nodes to. When omitted on create, the default subnet for the VPC is used. This value cannot be changed after the cluster is created.
vpc_uuid must also be set.
Requires vpc:read scope.
Trait Implementations§
Source§impl Clone for KubernetesCreateClusterBody
impl Clone for KubernetesCreateClusterBody
Source§fn clone(&self) -> KubernetesCreateClusterBody
fn clone(&self) -> KubernetesCreateClusterBody
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more