clusters
Overview
Name | clusters |
Type | Resource |
Id | digitalocean.kubernetes.clusters |
Fields
Name | Datatype | Description |
---|---|---|
id | string | A unique ID that can be used to identify and reference a Kubernetes cluster. |
name | string | A human-readable name for a Kubernetes cluster. |
auto_upgrade | boolean | A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. |
cluster_subnet | string | The range of IP addresses in the overlay network of the Kubernetes cluster in CIDR notation. |
created_at | string | A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. |
endpoint | string | The base URL of the API server on the Kubernetes master node. |
ha | boolean | 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. |
ipv4 | 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+) |
maintenance_policy | object | An object specifying the maintenance window policy for the Kubernetes cluster. |
node_pools | array | An object specifying the details of the worker nodes available to the Kubernetes cluster. |
region | string | The slug identifier for the region where the Kubernetes cluster is located. |
registry_enabled | boolean | A read-only boolean value indicating if a container registry is integrated with the cluster. |
service_subnet | string | The range of assignable IP addresses for services running in the Kubernetes cluster in CIDR notation. |
status | object | An object containing a state attribute whose value is set to a string indicating the current status of the cluster. |
surge_upgrade | boolean | 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. |
tags | array | An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged k8s and k8s:$K8S_CLUSTER_ID . |
updated_at | string | A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. |
version | string | 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. |
vpc_uuid | string | A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get_cluster | SELECT | cluster_id | To show information about an existing Kubernetes cluster, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID . |
list_clusters | SELECT | To list all of the Kubernetes clusters on your account, send a GET request to /v2/kubernetes/clusters . | |
create_cluster | INSERT | data__name, data__node_pools, data__region, data__version | To create a new Kubernetes cluster, send a POST request to/v2/kubernetes/clusters . The request must contain at least one node poolwith 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. |
delete_cluster | DELETE | cluster_id | To delete a Kubernetes cluster and all services deployed to it, send a DELETE request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID .A 204 status code with no body will be returned in response to a successful request. |
_get_cluster | EXEC | cluster_id | To show information about an existing Kubernetes cluster, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID . |
_list_clusters | EXEC | To list all of the Kubernetes clusters on your account, send a GET request to /v2/kubernetes/clusters . | |
destroy_associatedResourcesDangerous | EXEC | cluster_id | To delete a Kubernetes cluster with all of its associated resources, send a DELETE request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources/dangerous .A 204 status code with no body will be returned in response to a successful request. |
destroy_associatedResourcesSelective | EXEC | cluster_id | To delete a Kubernetes cluster along with a subset of its associated resources, send a DELETE request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources/selective .The JSON body of the request should include load_balancers , volumes , orvolume_snapshots keys each set to an array of IDs for the associatedresources to be destroyed. The IDs can be found by querying the cluster's associated resources endpoint. Any associated resource not included in the request will remain and continue to accrue changes on your account. |
get_kubeconfig | EXEC | cluster_id | This endpoint returns a kubeconfig file in YAML format. It can be used to connect to and administer the cluster using the Kubernetes command line tool, kubectl , or other programs supporting kubeconfig files (e.g., client libraries).The resulting kubeconfig file uses token-based authentication for clusters supporting it, and certificate-based authentication otherwise. For a list of supported versions and more information, see "How to Connect to a DigitalOcean Kubernetes Cluster with kubectl". To retrieve a kubeconfig file for use with a Kubernetes cluster, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/kubeconfig .Clusters supporting token-based authentication may define an expiration by passing a duration in seconds as a query parameter to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/kubeconfig?expiry_seconds=$DURATION_IN_SECONDS .If not set or 0, then the token will have a 7 day expiry. The query parameter has no impact in certificate-based authentication. |
list_associatedResources | EXEC | cluster_id | To list the associated billable resources that can be destroyed along with a cluster, send a GET request to the /v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources endpoint. |
update_cluster | EXEC | cluster_id, data__name | To update a Kubernetes cluster, send a PUT request to/v2/kubernetes/clusters/$K8S_CLUSTER_ID and specify one or more of theattributes below. |
upgrade_cluster | EXEC | cluster_id | To immediately upgrade a Kubernetes cluster to a newer patch release of Kubernetes, send a POST request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrade .The body of the request must specify a version attribute. Available upgrade versions for a cluster can be fetched from /v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrades . |