Release Note

Validated on 11 Dec 2018 • Last edited on 24 Jan 2025

Today we opened up access to the DigitalOcean Kubernetes service for all users. As part of this release, the API is now also available to all. While still in Limited Availability, you must first enable Kubernetes on your account by opting-in via the cloud control panel to access these endpoints.

Once enabled, you can list, create, or delete clusters as well as scale node pools up and down, recycle individual nodes, and retrieve the kubeconfig file for use with a cluster via the API. For example, to create a new cluster with a node pool using three s-2vcpu-2gb Droplets, make a POST to the /v2/kubernetes/clusters endpoint with a JSON body like:

{
  "name": "prod-cluster-01",
  "region": "nyc1",
  "version": "1.12.1-do.2",
  "tags": ["production"],
  "node_pools": [
    {
      "size": "s-2vcpu-2gb",
      "count": 3,
      "name": "woker-pool"
    }
  ]
}

The response includes a full JSON representation of the cluster. The initial value of the cluster’s status.state attribute is “provisioning.” When the cluster is ready for use, this transitions to “running.” You can use the /v2/kubernetes/options endpoint to find the available versions of Kubernetes as well as the supported regions and Droplet sizes.

Once ready, you can retrieve the credentials for use with the cluster by sending a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/kubeconfig. The response is a kubeconfig file in YAML format. This file can be used to connect to and administer the cluster using the Kubernetes command line tool, kubectl. For more information, see “How to Connect to a DigitalOcean Kubernetes Cluster with kubectl.”

For the all the details, see the full API reference documentation for DigitalOcean Kubernetes.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.