openapi: 3.0.0 info: title: DigitalOcean Kubernetes API version: '2.0' description: "# Introduction\n\nThe DigitalOcean API allows you to manage Droplets and resources within the\nDigitalOcean cloud in a simple, programmatic way using conventional HTTP requests.\n\nAll of the functionality that you are familiar with in the DigitalOcean\ncontrol panel is also available through the API, allowing you to script the\ncomplex actions that your situation requires.\n\nThe API documentation will start with a general overview about the design\nand technology that has been implemented, followed by reference information\nabout specific endpoints.\n\n## Requests\n\nAny tool that is fluent in HTTP can communicate with the API simply by\nrequesting the correct URI. Requests should be made using the HTTPS protocol\nso that traffic is encrypted. The interface responds to different methods\ndepending on the action required.\n\n|Method|Usage|\n|--- |--- |\n|GET|For simple retrieval of information about your account, Droplets, or environment, you should use the GET method. The information you request will be returned to you as a JSON object. The attributes defined by the JSON object can be used to form additional requests. Any request using the GET method is read-only and will not affect any of the objects you are querying.|\n|DELETE|To destroy a resource and remove it from your account and environment, the DELETE method should be used. This will remove the specified object if it is found. If it is not found, the operation will return a response indicating that the object was not found. This idempotency means that you do not have to check for a resource's availability prior to issuing a delete command, the final state will be the same regardless of its existence.|\n|PUT|To update the information about a resource in your account, the PUT method is available. Like the DELETE Method, the PUT method is idempotent. It sets the state of the target using the provided values, regardless of their current values. Requests using the PUT method do not need to check the current attributes of the object.|\n|PATCH|Some resources support partial modification. In these cases, the PATCH method is available. Unlike PUT which generally requires a complete representation of a resource, a PATCH request is a set of instructions on how to modify a resource updating only specific attributes.|\n|POST|To create a new object, your request should specify the POST method. The POST request includes all of the attributes necessary to create a new object. When you wish to create a new object, send a POST request to the target endpoint.|\n|HEAD|Finally, to retrieve metadata information, you should use the HEAD method to get the headers. This returns only the header of what would be returned with an associated GET request. Response headers contain some useful information about your API access and the results that are available for your request. For instance, the headers contain your current rate-limit value and the amount of time available until the limit resets. It also contains metrics about the total number of objects found, pagination information, and the total content length.|\n\n\n## HTTP Statuses\n\nAlong with the HTTP methods that the API responds to, it will also return\nstandard HTTP statuses, including error codes.\n\nIn the event of a problem, the status will contain the error code, while the\nbody of the response will usually contain additional information about the\nproblem that was encountered.\n\nIn general, if the status returned is in the 200 range, it indicates that\nthe request was fulfilled successfully and that no error was encountered.\n\nReturn codes in the 400 range typically indicate that there was an issue\nwith the request that was sent. Among other things, this could mean that you\ndid not authenticate correctly, that you are requesting an action that you\ndo not have authorization for, that the object you are requesting does not\nexist, or that your request is malformed.\n\nIf you receive a status in the 500 range, this generally indicates a\nserver-side problem. This means that we are having an issue on our end and\ncannot fulfill your request currently.\n\n400 and 500 level error responses will include a JSON object in their body,\nincluding the following attributes:\n\n|Name|Type|Description|\n|--- |--- |--- |\n|id|string|A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be \"not_found.\"|\n|message|string|A message providing additional information about the error, including details to help resolve it when possible.|\n|request_id|string|Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.|\n\n### Example Error Response\n\n```\n HTTP/1.1 403 Forbidden\n {\n \"id\": \"forbidden\",\n \"message\": \"You do not have access for the attempted action.\"\n }\n```\n\n## Responses\n\nWhen a request is successful, a response body will typically be sent back in\nthe form of a JSON object. An exception to this is when a DELETE request is\nprocessed, which will result in a successful HTTP 204 status and an empty\nresponse body.\n\nInside of this JSON object, the resource root that was the target of the\nrequest will be set as the key. This will be the singular form of the word\nif the request operated on a single object, and the plural form of the word\nif a collection was processed.\n\nFor example, if you send a GET request to `/v2/droplets/$DROPLET_ID` you\nwill get back an object with a key called \"`droplet`\". However, if you send\nthe GET request to the general collection at `/v2/droplets`, you will get\nback an object with a key called \"`droplets`\".\n\nThe value of these keys will generally be a JSON object for a request on a\nsingle object and an array of objects for a request on a collection of\nobjects.\n\n### Response for a Single Object\n\n```json\n {\n \"droplet\": {\n \"name\": \"example.com\"\n . . .\n }\n }\n```\n\n### Response for an Object Collection\n\n```json\n {\n \"droplets\": [\n {\n \"name\": \"example.com\"\n . . .\n },\n {\n \"name\": \"second.com\"\n . . .\n }\n ]\n }\n```\n\n## Meta\n\nIn addition to the main resource root, the response may also contain a\n`meta` object. This object contains information about the response itself.\n\nThe `meta` object contains a `total` key that is set to the total number of\nobjects returned by the request. This has implications on the `links` object\nand pagination.\n\nThe `meta` object will only be displayed when it has a value. Currently, the\n`meta` object will have a value when a request is made on a collection (like\n`droplets` or `domains`).\n\n\n### Sample Meta Object\n\n```json\n {\n . . .\n \"meta\": {\n \"total\": 43\n }\n . . .\n }\n```\n\n## Links & Pagination\n\nThe `links` object is returned as part of the response body when pagination\nis enabled. By default, 20 objects are returned per page. If the response\ncontains 20 objects or fewer, no `links` object will be returned. If the\nresponse contains more than 20 objects, the first 20 will be returned along\nwith the `links` object.\n\nYou can request a different pagination limit or force pagination by\nappending `?per_page=` to the request with the number of items you would\nlike per page. For instance, to show only two results per page, you could\nadd `?per_page=2` to the end of your query. The maximum number of results\nper page is 200.\n\nThe `links` object contains a `pages` object. The `pages` object, in turn,\ncontains keys indicating the relationship of additional pages. The values of\nthese are the URLs of the associated pages. The keys will be one of the\nfollowing:\n\n* **first**: The URI of the first page of results.\n* **prev**: The URI of the previous sequential page of results.\n* **next**: The URI of the next sequential page of results.\n* **last**: The URI of the last page of results.\n\nThe `pages` object will only include the links that make sense. So for the\nfirst page of results, no `first` or `prev` links will ever be set. This\nconvention holds true in other situations where a link would not make sense.\n\n### Sample Links Object\n\n```json\n {\n . . .\n \"links\": {\n \"pages\": {\n \"last\": \"https://api.digitalocean.com/v2/images?page=2\",\n \"next\": \"https://api.digitalocean.com/v2/images?page=2\"\n }\n }\n . . .\n }\n```\n\n## Rate Limit\n\nRequests through the API are rate limited per OAuth token. Current rate limits:\n\n* 5,000 requests per hour\n* 250 requests per minute (5% of the hourly total)\n\nOnce you exceed either limit, you will be rate limited until the next cycle\nstarts. Space out any requests that you would otherwise issue in bursts for\nthe best results.\n\nThe rate limiting information is contained within the response headers of\neach request. The relevant headers are:\n\n* **ratelimit-limit**: The number of requests that can be made per hour.\n* **ratelimit-remaining**: The number of requests that remain before you hit your request limit. See the information below for how the request limits expire.\n* **ratelimit-reset**: This represents the time when the oldest request will expire. The value is given in [Unix epoch time](http://en.wikipedia.org/wiki/Unix_time). See below for more information about how request limits expire.\n\nMore rate limiting information is returned only within burst limit error response headers:\n* **retry-after**: The number of seconds to wait before making another request when rate limited.\n\nAs long as the `ratelimit-remaining` count is above zero, you will be able\nto make additional requests.\n\nThe way that a request expires and is removed from the current limit count\nis important to understand. Rather than counting all of the requests for an\nhour and resetting the `ratelimit-remaining` value at the end of the hour,\neach request instead has its own timer.\n\nThis means that each request contributes toward the `ratelimit-remaining`\ncount for one complete hour after the request is made. When that request's\ntimer runs out, it is no longer counted towards the request limit.\n\nThis has implications on the meaning of the `ratelimit-reset` header as\nwell. Because the entire rate limit is not reset at one time, the value of\nthis header is set to the time when the _oldest_ request will expire.\n\nKeep this in mind if you see your `ratelimit-reset` value change, but not\nmove an entire hour into the future.\n\nIf the `ratelimit-remaining` reaches zero, subsequent requests will receive\na 429 error code until the request reset has been reached. \n\n`ratelimit-remaining` reaching zero can also indicate that the \"burst limit\" of 250 \nrequests per minute limit was met, even if the 5,000 requests per hour limit was not. \nIn this case, the 429 error response will include a `retry-after` header to indicate how \nlong to wait (in seconds) until the request may be retried.\n\nYou can see the format of the response in the examples. \n\n**Note:** The following endpoints have special rate limit requirements that\nare independent of the limits defined above.\n\n* Only 12 `POST` requests to the `/v2/floating_ips` endpoint to create Floating IPs can be made per 60 seconds.\n* Only 10 `GET` requests to the `/v2/account/keys` endpoint to list SSH keys can be made per 60 seconds.\n* Only 5 requests to any and all `v2/cdn/endpoints` can be made per 10 seconds. This includes `v2/cdn/endpoints`, \n `v2/cdn/endpoints/$ENDPOINT_ID`, and `v2/cdn/endpoints/$ENDPOINT_ID/cache`.\n* Only 50 strings within the `files` json struct in the `v2/cdn/endpoints/$ENDPOINT_ID/cache` [payload](https://docs.digitalocean.com/reference/api/api-reference/#operation/cdn_purge_cache) \n can be requested every 20 seconds.\n\n### Sample Rate Limit Headers\n\n```\n . . .\n ratelimit-limit: 1200\n ratelimit-remaining: 1193\n rateLimit-reset: 1402425459\n . . .\n```\n\n ### Sample Rate Limit Headers When Burst Limit is Reached:\n\n```\n . . .\n ratelimit-limit: 5000\n ratelimit-remaining: 0\n rateLimit-reset: 1402425459\n retry-after: 29\n . . .\n```\n\n### Sample Rate Exceeded Response\n\n```\n 429 Too Many Requests\n {\n id: \"too_many_requests\",\n message: \"API Rate limit exceeded.\"\n }\n```\n\n## Curl Examples\n\nThroughout this document, some example API requests will be given using the\n`curl` command. This will allow us to demonstrate the various endpoints in a\nsimple, textual format.\n \n These examples assume that you are using a Linux or macOS command line. To run\nthese commands on a Windows machine, you can either use cmd.exe, PowerShell, or WSL:\n\n* For cmd.exe, use the `set VAR=VALUE` [syntax](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/set_1)\nto define environment variables, call them with `%VAR%`, then replace all backslashes (`\\`) in the examples with carets (`^`).\n\n* For PowerShell, use the `$Env:VAR = \"VALUE\"` [syntax](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.2)\nto define environment variables, call them with `$Env:VAR`, then replace `curl` with `curl.exe` and all backslashes (`\\`) in the examples with backticks (`` ` ``).\n\n* WSL is a compatibility layer that allows you to emulate a Linux terminal on a Windows machine.\nInstall WSL with our [community tutorial](https://www.digitalocean.com/community/tutorials/how-to-install-the-windows-subsystem-for-linux-2-on-microsoft-windows-10), \nthen follow this API documentation normally.\n\nThe names of account-specific references (like Droplet IDs, for instance)\nwill be represented by variables. For instance, a Droplet ID may be\nrepresented by a variable called `$DROPLET_ID`. You can set the associated\nvariables in your environment if you wish to use the examples without\nmodification.\n\nThe first variable that you should set to get started is your OAuth\nauthorization token. The next section will go over the details of this, but\nyou can set an environmental variable for it now.\n\nGenerate a token by going to the [Apps & API](https://cloud.digitalocean.com/settings/applications)\nsection of the DigitalOcean control panel. Use an existing token if you have\nsaved one, or generate a new token with the \"Generate new token\" button.\nCopy the generated token and use it to set and export the TOKEN variable in\nyour environment as the example shows.\n\nYou may also wish to set some other variables now or as you go along. For\nexample, you may wish to set the `DROPLET_ID` variable to one of your\nDroplet IDs since this will be used frequently in the API.\n\nIf you are following along, make sure you use a Droplet ID that you control\nso that your commands will execute correctly.\n\nIf you need access to the headers of a response through `curl`, you can pass\nthe `-i` flag to display the header information along with the body. If you\nare only interested in the header, you can instead pass the `-I` flag, which\nwill exclude the response body entirely.\n\n\n### Set and Export your OAuth Token\n\n```\nexport DIGITALOCEAN_TOKEN=your_token_here\n```\n\n### Set and Export a Variable\n\n```\nexport DROPLET_ID=1111111\n```\n\n## Parameters\n\nThere are two different ways to pass parameters in a request with the API.\n\nWhen passing parameters to create or update an object, parameters should be\npassed as a JSON object containing the appropriate attribute names and\nvalues as key-value pairs. When you use this format, you should specify that\nyou are sending a JSON object in the header. This is done by setting the\n`Content-Type` header to `application/json`. This ensures that your request\nis interpreted correctly.\n\nWhen passing parameters to filter a response on GET requests, parameters can\nbe passed using standard query attributes. In this case, the parameters\nwould be embedded into the URI itself by appending a `?` to the end of the\nURI and then setting each attribute with an equal sign. Attributes can be\nseparated with a `&`. Tools like `curl` can create the appropriate URI when\ngiven parameters and values; this can also be done using the `-F` flag and\nthen passing the key and value as an argument. The argument should take the\nform of a quoted string with the attribute being set to a value with an\nequal sign.\n\n### Pass Parameters as a JSON Object\n\n```\n curl -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"name\": \"example.com\", \"ip_address\": \"127.0.0.1\"}' \\\n -X POST \"https://api.digitalocean.com/v2/domains\"\n```\n\n### Pass Filter Parameters as a Query String\n\n```\n curl -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -X GET \\\n \"https://api.digitalocean.com/v2/images?private=true\"\n```\n\n## Cross Origin Resource Sharing\n\nIn order to make requests to the API from other domains, the API implements\nCross Origin Resource Sharing (CORS) support.\n\nCORS support is generally used to create AJAX requests outside of the domain\nthat the request originated from. This is necessary to implement projects\nlike control panels utilizing the API. This tells the browser that it can\nsend requests to an outside domain.\n\nThe procedure that the browser initiates in order to perform these actions\n(other than GET requests) begins by sending a \"preflight\" request. This sets\nthe `Origin` header and uses the `OPTIONS` method. The server will reply\nback with the methods it allows and some of the limits it imposes. The\nclient then sends the actual request if it falls within the allowed\nconstraints.\n\nThis process is usually done in the background by the browser, but you can\nuse curl to emulate this process using the example provided. The headers\nthat will be set to show the constraints are:\n\n* **Access-Control-Allow-Origin**: This is the domain that is sent by the client or browser as the origin of the request. It is set through an `Origin` header.\n* **Access-Control-Allow-Methods**: This specifies the allowed options for requests from that domain. This will generally be all available methods.\n* **Access-Control-Expose-Headers**: This will contain the headers that will be available to requests from the origin domain.\n* **Access-Control-Max-Age**: This is the length of time that the access is considered valid. After this expires, a new preflight should be sent.\n* **Access-Control-Allow-Credentials**: This will be set to `true`. It basically allows you to send your OAuth token for authentication.\n\nYou should not need to be concerned with the details of these headers,\nbecause the browser will typically do all of the work for you.\n" license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html contact: name: DigitalOcean API Team email: api-engineering@digitalocean.com termsOfService: https://www.digitalocean.com/legal/terms-of-service-agreement/ servers: - url: https://api.digitalocean.com description: production security: - bearer_auth: [] tags: - name: Kubernetes description: '[DigitalOcean Kubernetes](https://docs.digitalocean.com/products/kubernetes/) allows you to quickly deploy scalable and secure Kubernetes clusters. By sending requests to the `/v2/kubernetes/clusters` endpoint, 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.' paths: /v2/kubernetes/clusters: get: operationId: kubernetes_list_clusters summary: List All Kubernetes Clusters description: 'To list all of the Kubernetes clusters on your account, send a GET request to `/v2/kubernetes/clusters`. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/per_page' - $ref: '#/components/parameters/page' responses: '200': $ref: '#/components/responses/all_clusters' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n opt := &godo.ListOptions{\n Page: 1,\n PerPage: 200,\n }\n\n clusters, _, err := client.Kubernetes.List(ctx, opt)\n}" - lang: Ruby source: 'require ''droplet_kit'' token = ENV[''DIGITALOCEAN_TOKEN''] client = DropletKit::Client.new(access_token: token) clusters = client.kubernetes_clusters.all clusters.each' - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.list_clusters()' security: - bearer_auth: - kubernetes:read post: operationId: kubernetes_create_cluster summary: Create a New Kubernetes Cluster description: '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](https://docs.digitalocean.com/products/kubernetes/how-to/upgrade-cluster/) for details. ' tags: - Kubernetes requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/cluster' examples: Kubernetes Cluster Request: $ref: '#/components/examples/kubernetes_clusters_basic_request' Kubernetes Cluster with Multiple Node Pools Request: $ref: '#/components/examples/kubernetes_clusters_multi_pool_request' responses: '201': $ref: '#/components/responses/cluster_create' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"name\": \"prod-cluster-01\",\"region\": \"nyc1\",\"version\": \"1.14.1\\\n -do.4\",\"tags\": [\"production\",\"web-team\"],\"node_pools\": [{\"size\": \"s-1vcpu-2gb\",\"count\": 3,\"name\": \"frontend-pool\",\"tags\": [\"frontend\"],\"labels\": {\"service\": \"frontend\", \"priority\": \"high\"}},{\"size\": \"c-4\",\"count\": 2,\"name\": \"backend-pool\"}]}' \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n createRequest := &godo.KubernetesClusterCreateRequest{\n Name: \"prod-cluster-01\",\n RegionSlug: \"nyc1\",\n VersionSlug: \"1.14.1-do.4\",\n Tags: []string{\"production\", \"web-team\"},\n NodePools: []*godo.KubernetesNodePoolCreateRequest{\n &godo.KubernetesNodePoolCreateRequest{\n Name: \"frontend-pool\",\n Size: \"s-2vcpu-2gb\",\n Count: 3,\n Tags: []string{\"frontend\"},\n Labels: map[string]string{\"service\": \"frontend\", \"priority\": \"high\"},\n },\n &godo.KubernetesNodePoolCreateRequest{\n Name: \"backend-pool\",\n Size: \"c-4\",\n Count: 2,\n },\n },\n }\n\n cluster, _, err := client.Kubernetes.Create(ctx, createRequest)\n}" - lang: Ruby source: "require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ncluster = DropletKit::KubernetesCluster.new(\n name: 'prod-cluster-01',\n region: 'nyc1',\n version: '1.14.1-do.4',\n tags: ['production', 'web-team'],\n node_pools: [\n {\n name: 'frontend-pool',\n size: 's-2vcpu-2gb',\n count: 3,\n tags: ['frontend'],\n labels: {service: 'frontend', priority: 'high'}\n },\n {\n name: 'backend-pool',\n size: 'c-4',\n count: 2\n }\n ]\n)\n\nclient.kubernetes_clusters.create(cluster)" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"name\": \"prod-cluster-01\",\n \"region\": \"nyc1\",\n \"version\": \"1.18.6-do.0\",\n \"node_pools\": [\n {\n \"size\": \"s-1vcpu-2gb\",\n \"count\": 3,\n \"name\": \"worker-pool\"\n }\n ]\n}\n\nresp = client.kubernetes.create_cluster(body=req)" security: - bearer_auth: - kubernetes:create /v2/kubernetes/clusters/{cluster_id}: get: operationId: kubernetes_get_cluster summary: Retrieve an Existing Kubernetes Cluster description: 'To show information about an existing Kubernetes cluster, send a GET request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID`. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' responses: '200': $ref: '#/components/responses/existing_cluster' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n cluster, _, err := client.Kubernetes.Get(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n}" - lang: Ruby source: 'require ''droplet_kit'' token = ENV[''DIGITALOCEAN_TOKEN''] client = DropletKit::Client.new(access_token: token) client.kubernetes_clusters.find(id: ''bd5f5959-5e1e-4205-a714-a914373942af'')' - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.get_cluster(cluster_id="da8fda8")' security: - bearer_auth: - kubernetes:read put: operationId: kubernetes_update_cluster summary: Update a Kubernetes Cluster description: 'To update a Kubernetes cluster, send a PUT request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID` and specify one or more of the attributes below. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/cluster_update' responses: '202': $ref: '#/components/responses/updated_cluster' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"name\": \"stage-cluster-01\", \"tags\":[\"staging\", \"web-team\"]}' \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n updateRequest := &godo.KubernetesClusterUpdateRequest{\n Name: \"stage-cluster-01\",\n Tags: []string{\"staging\", \"web-team\"},\n }\n\n cluster, _, err := client.Kubernetes.Update(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", updateRequest)\n}" - lang: Ruby source: "require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\ncluster = DropletKit::KubernetesCluster.new(\n name: 'foo',\n tags: ['staging', 'web-team']\n)\n\nclient.kubernetes_clusters.update(cluster, id: 'bd5f5959-5e1e-4205-a714-a914373942af')" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"name\": \"prod-cluster-01\",\n \"tags\": [\n \"k8s\",\n \"k8s:bd5f5959-5e1e-4205-a714-a914373942af\",\n \"production\",\n \"web-team\"\n ],\n \"maintenance_policy\": {\n \"start_time\": \"12:00\",\n \"day\": \"any\"\n },\n \"auto_upgrade\": True,\n \"surge_upgrade\": True,\n \"ha\": True\n}\n\nresp = client.kubernetes.update_cluster(cluster_id=\"1fd32a\", body=req)" security: - bearer_auth: - kubernetes:update delete: operationId: kubernetes_delete_cluster summary: Delete a Kubernetes Cluster description: '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. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, err := client.Kubernetes.Delete(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n}" - lang: Ruby source: 'require ''droplet_kit'' token = ENV[''DIGITALOCEAN_TOKEN''] client = DropletKit::Client.new(access_token: token) client.kubernetes_clusters.delete(id: ''bd5f5959-5e1e-4205-a714-a914373942af'')' - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.delete_cluster(cluster_id="da8fda8")' security: - bearer_auth: - kubernetes:delete /v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources: get: operationId: kubernetes_list_associatedResources summary: List Associated Resources for Cluster Deletion description: 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. tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' responses: '200': $ref: '#/components/responses/associated_kubernetes_resources_list' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/destroy_with_associated_resources\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, err := client.Kubernetes.ListAssociatedResourcesForDeletion(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.list_associated_resources(cluster_id="da8fda8")' security: - bearer_auth: - kubernetes:read /v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources/selective: delete: operationId: kubernetes_destroy_associatedResourcesSelective summary: Selectively Delete a Cluster and its Associated Resources description: '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`, or `volume_snapshots` keys each set to an array of IDs for the associated resources 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. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/destroy_associated_kubernetes_resources' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"load_balancers\": [\"4de7ac8b-495b-4884-9a69-1050c6793cd6\"],\"volumes\": [\"ba49449a-7435-11ea-b89e-0a58ac14480f\"],\"volume_snapshots\": [\"edb0478d-7436-11ea-86e6-0a58ac144b91\"]}' \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/destroy_with_associated_resources/selective\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n deleteReq := &godo.KubernetesClusterDeleteSelectiveRequest{Volumes: []string{\"ba49449a-7435-11ea-b89e-0a58ac14480f\"}}, _, err := client.Kubernetes.DeleteSelective(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", deleteReq)\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"load_balancers\": [\n \"4de7ac8b-495b-4884-9a69-1050c6793cd6\"\n ],\n \"volumes\": [\n \"ba49449a-7435-11ea-b89e-0a58ac14480f\"\n ],\n \"volume_snapshots\": [\n \"edb0478d-7436-11ea-86e6-0a58ac144b91\"\n ]\n}\n\nresp = client.kubernetes.destroy_associated_resources_selective(cluster_id=\"da8fda8\", body=req)" security: - bearer_auth: - kubernetes:delete /v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources/dangerous: delete: operationId: kubernetes_destroy_associatedResourcesDangerous summary: Delete a Cluster and All of its Associated Resources (Dangerous) description: '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. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/destroy_with_associated_resources/dangerous\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, err := client.Kubernetes.DeleteDangerous(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.destroy_associated_resources_dangerous(cluster_id="da8fda8")' security: - bearer_auth: - kubernetes:delete /v2/kubernetes/clusters/{cluster_id}/kubeconfig: get: operationId: kubernetes_get_kubeconfig summary: Retrieve the kubeconfig for a Kubernetes Cluster description: '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](https://docs.digitalocean.com/products/kubernetes/how-to/connect-to-cluster/)". 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. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' - $ref: '#/components/parameters/kubernetes_expiry_seconds' responses: '200': $ref: '#/components/responses/kubeconfig' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/kubeconfig\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n config, _, err := client.Kubernetes.GetKubeConfig(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n\n kubeConfigFile := string(config.KubeconfigYAML)\n}" - lang: Ruby source: 'require ''droplet_kit'' token = ENV[''DIGITALOCEAN_TOKEN''] client = DropletKit::Client.new(access_token: token) client.kubernetes_clusters.kubeconfig(id: ''bd5f5959-5e1e-4205-a714-a914373942af'')' - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.get_kubeconfig(cluster_id="da8fda8")' security: - bearer_auth: - kubernetes:access_cluster /v2/kubernetes/clusters/{cluster_id}/credentials: get: operationId: kubernetes_get_credentials summary: Retrieve Credentials for a Kubernetes Cluster description: 'This endpoint returns a JSON object . It can be used to programmatically construct Kubernetes clients which cannot parse kubeconfig files. The resulting JSON object contains 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](https://docs.digitalocean.com/products/kubernetes/how-to/connect-to-cluster/)". To retrieve credentials for accessing a Kubernetes cluster, send a GET request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/credentials`. 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/credentials?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. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' - $ref: '#/components/parameters/kubernetes_expiry_seconds' responses: '200': $ref: '#/components/responses/credentials' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/credentials\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n credentials, _, err := client.Kubernetes.GetCredentials(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n}" - lang: Ruby source: 'require ''droplet_kit'' token = ENV[''DIGITALOCEAN_TOKEN''] client = DropletKit::Client.new(access_token: token) client.kubernetes_clusters.credentials(id: ''bd5f5959-5e1e-4205-a714-a914373942af'')' - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.get_credentials(cluster_id="da8fda8")' security: - bearer_auth: - kubernetes:access_cluster /v2/kubernetes/clusters/{cluster_id}/upgrades: get: operationId: kubernetes_get_availableUpgrades summary: Retrieve Available Upgrades for an Existing Kubernetes Cluster description: 'To determine whether a cluster can be upgraded, and the versions to which it can be upgraded, send a GET request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrades`. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' responses: '200': $ref: '#/components/responses/available_upgrades' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/upgrades\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n upgrades, _, err := client.Kubernetes.GetUpgrades(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\")\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.get_available_upgrades(cluster_id="da8fda8")' security: - bearer_auth: - kubernetes:read /v2/kubernetes/clusters/{cluster_id}/upgrade: post: operationId: kubernetes_upgrade_cluster summary: Upgrade a Kubernetes Cluster description: '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`. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' requestBody: required: true content: application/json: schema: properties: version: type: string example: 1.16.13-do.0 description: The slug identifier for the version of Kubernetes that the cluster will be upgraded to. responses: '202': $ref: '#/components/responses/accepted' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/upgrades\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n upgradeRequest := &godo.KubernetesClusterUpgradeRequest{\n \tVersionSlug: \"1.12.3-do.1\",\n }\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"version\": \"1.16.13-do.0\"\n}\n\nresp = client.kubernetes.upgrade_cluster(cluster_id=\"1fd32a\", body=req)" security: - bearer_auth: - kubernetes:update /v2/kubernetes/clusters/{cluster_id}/node_pools: get: operationId: kubernetes_list_nodePools summary: List All Node Pools in a Kubernetes Clusters description: 'To list all of the node pools in a Kubernetes clusters, send a GET request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools`. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' responses: '200': $ref: '#/components/responses/all_node_pools' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/node_pools\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n opt := &godo.ListOptions{\n Page: 1,\n PerPage: 200,\n }\n\n nodePools, _, err := client.Kubernetes.ListNodePools(ctx, \"9b729d1c-730c-42e1-b136-59326fb1b3bb\", opt)\n}" - lang: Ruby source: 'require ''droplet_kit'' token = ENV[''DIGITALOCEAN_TOKEN''] client = DropletKit::Client.new(access_token: token) node_pools = client.kubernetes_clusters.node_pools(id: ''bd5f5959-5e1e-4205-a714-a914373942af'') node_pools.each' - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.list_node_pools(cluster_id="a8fsa8d")' security: - bearer_auth: - kubernetes:read post: operationId: kubernetes_add_nodePool summary: Add a Node Pool to a Kubernetes Cluster description: 'To add an additional node pool to a Kubernetes clusters, send a POST request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools` with the following attributes. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/kubernetes_node_pool' example: size: s-1vcpu-2gb count: 3 name: new-pool tags: - frontend auto_scale: true min_nodes: 3 max_nodes: 6 responses: '201': $ref: '#/components/responses/node_pool_create' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"size\": \"s-2vcpu-4gb\",\"count\": 1,\"name\": \"pool-02\",\"tags\": [\"web\"], \"labels\": {\"service\": \"web\", \"priority\": \"high\"}}' \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/node_pools\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n createRequest := &godo.KubernetesNodePoolCreateRequest{\n Name: \"pool-02\",\n Size: \"s-2vcpu-4gb\",\n Count: 1,\n Tags: []string{\"web\"},\n Labels: map[string]string{\"service\": \"web\", \"priority\": \"high\"},\n }\n\n nodePool, _, err := client.Kubernetes.CreateNodePool(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", createRequest)\n}" - lang: Ruby source: "require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nnode_pool = DropletKit::KubernetesNodePool.new(\n name: 'pool-02',\n size: 's-2vcpu-4gb',\n count: 1,\n tags: ['web']\n labels: {service: 'web', priority: 'high'}\n)\n\nclient.kubernetes_clusters.create_node_pool(node_pool, id: 'bd5f5959-5e1e-4205-a714-a914373942af')" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"size\": \"s-1vcpu-2gb\",\n \"count\": 3,\n \"name\": \"new-pool\",\n \"tags\": [\n \"frontend\"\n ],\n \"auto_scale\": True,\n \"min_nodes\": 3,\n \"max_nodes\": 6\n}\n\nresp = client.kubernetes.add_node_pool(cluster_id=\"ba9d8da\", body=req)" security: - bearer_auth: - kubernetes:create /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}: get: operationId: kubernetes_get_nodePool summary: Retrieve a Node Pool for a Kubernetes Cluster description: 'To show information about a specific node pool in a Kubernetes cluster, send a GET request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID`. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' - $ref: '#/components/parameters/kubernetes_node_pool_id' responses: '200': $ref: '#/components/responses/existing_node_pool' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/credentials\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n nodePool, _, err := client.Kubernetes.GetNodePool(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", \"cdda885e-7663-40c8-bc74-3a036c66545d\")\n}" - lang: Ruby source: 'require ''droplet_kit'' token = ENV[''DIGITALOCEAN_TOKEN''] client = DropletKit::Client.new(access_token: token) client.kubernetes_clusters.find_node_pool(id: ''bd5f5959-5e1e-4205-a714-a914373942af'', pool_id: ''cdda885e-7663-40c8-bc74-3a036c66545d'')' - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.get_node_pool(cluster_id="da8fda8", node_pool_id="a8a8fsa")' security: - bearer_auth: - kubernetes:read put: operationId: kubernetes_update_nodePool summary: Update a Node Pool in a Kubernetes Cluster description: 'To update the name of a node pool, edit the tags applied to it, or adjust its number of nodes, send a PUT request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID` with the following attributes. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' - $ref: '#/components/parameters/kubernetes_node_pool_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/kubernetes_node_pool_update' responses: '202': $ref: '#/components/responses/node_pool_update' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X PUT \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"name\": \"frontend\",\"count\": 1, \"tags\":[\"frontend\"], \"labels\": {\"service\": \"frontend\", \"priority\": \"high\"}}' \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/node_pools/86c9bc8c-b2c3-4d40-8000-b0c7bee27305\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n updateRequest := &godo.KubernetesNodePoolUpdateRequest{\n Name: \"frontend\",\n Count: 1,\n Tags: []string{\"frontend\"},\n Labels: map[string]string{\"service\": \"frontend\", \"priority\": \"high\"},\n }\n\n nodePool, _, err := client.Kubernetes.UpdateNodePool(ctx, \"9b729d1c-730c-42e1-b136-59326fb1b3bb\", \"e7ed8f7c-6c1e-472f-adfb-4a9a1688b999\", updateRequest)\n}" - lang: Ruby source: "require 'droplet_kit'\ntoken = ENV['DIGITALOCEAN_TOKEN']\nclient = DropletKit::Client.new(access_token: token)\n\nnode_pool = DropletKit::KubernetesNodePool.new(\n name: 'frontend',\n count: 1,\n tags: ['frontend']\n labels: {service: 'frontend', priority: 'high'}\n)\n\nclient.kubernetes_clusters.update_node_pool(node_pool, id: 'bd5f5959-5e1e-4205-a714-a914373942af', pool_id: '86c9bc8c-b2c3-4d40-8000-b0c7bee27305')" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"name\": \"frontend-pool\",\n \"count\": 3,\n \"tags\": [\n \"k8s\",\n \"k8s:bd5f5959-5e1e-4205-a714-a914373942af\",\n \"k8s-worker\",\n \"production\",\n \"web-team\"\n ],\n \"labels\": None,\n \"taints\": [\n {\n \"key\": \"priority\",\n \"value\": \"high\",\n \"effect\": \"NoSchedule\"\n }\n ],\n \"auto_scale\": True,\n \"min_nodes\": 3,\n \"max_nodes\": 6\n}\n\nresp = client.kubernetes.update_node_pool(cluster_id=\"1fd32a\", node_pool_id=\"392fa3a\", body=req)" security: - bearer_auth: - kubernetes:update delete: operationId: kubernetes_delete_nodePool summary: Delete a Node Pool in a Kubernetes Cluster description: 'To delete a node pool, send a DELETE request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID`. A 204 status code with no body will be returned in response to a successful request. Nodes in the pool will subsequently be drained and deleted. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' - $ref: '#/components/parameters/kubernetes_node_pool_id' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/node_pools/86c9bc8c-b2c3-4d40-8000-b0c7bee27305\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, err := client.Kubernetes.DeleteNodePool(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", \"86c9bc8c-b2c3-4d40-8000-b0c7bee27305\")\n}" - lang: Ruby source: 'require ''droplet_kit'' token = ENV[''DIGITALOCEAN_TOKEN''] client = DropletKit::Client.new(access_token: token) client.kubernetes_clusters.delete_node_pool(id: ''bd5f5959-5e1e-4205-a714-a914373942af'', pool_id: ''86c9bc8c-b2c3-4d40-8000-b0c7bee27305'')' - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.delete_node_pool(cluster_id="da8fda8", node_pool_id="a8f3da")' security: - bearer_auth: - kubernetes:delete /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}/nodes/{node_id}: delete: operationId: kubernetes_delete_node summary: Delete a Node in a Kubernetes Cluster description: 'To delete a single node in a pool, send a DELETE request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID/nodes/$NODE_ID`. Appending the `skip_drain=1` query parameter to the request causes node draining to be skipped. Omitting the query parameter or setting its value to `0` carries out draining prior to deletion. Appending the `replace=1` query parameter to the request causes the node to be replaced by a new one after deletion. Omitting the query parameter or setting its value to `0` deletes without replacement. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' - $ref: '#/components/parameters/kubernetes_node_pool_id' - $ref: '#/components/parameters/kubernetes_node_id' - $ref: '#/components/parameters/kubernetes_node_skip_drain' - $ref: '#/components/parameters/kubernetes_node_replace' responses: '202': $ref: '#/components/responses/accepted' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/node_pools/86c9bc8c-b2c3-4d40-8000-b0c7bee27305/nodes/478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f?skip_drain=0&replace=1\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n recycleRequest := &godo.KubernetesNodePoolRecycleNodesRequest{\n Nodes: []string{\"3385619f-8ec3-42ba-bb23-8d21b8ba7518\", \"4b8f60ff-ba06-4523-a6a4-b8148244c7e6\"},\n }\n\n _, err := client.Kubernetes.RecycleNodePoolNodes(ctx, \"bd5f5959-5e1e-4205-a714-a914373942af\", \"86c9bc8c-b2c3-4d40-8000-b0c7bee27305\", recycleRequest)\n}" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.delete_node(cluster_id="da8fda8", node_pool_id="a8f3da", node_id="fa09daf")' security: - bearer_auth: - kubernetes:delete /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}/recycle: post: operationId: kubernetes_recycle_node_pool deprecated: true summary: Recycle a Kubernetes Node Pool description: 'The endpoint has been deprecated. Please use the DELETE `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID/nodes/$NODE_ID` method instead. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' - $ref: '#/components/parameters/kubernetes_node_pool_id' requestBody: required: true content: application/json: schema: properties: nodes: type: array items: type: string example: - d8db5e1a-6103-43b5-a7b3-8a948210a9fc responses: '202': $ref: '#/components/responses/accepted' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' security: - bearer_auth: - kubernetes:delete /v2/kubernetes/clusters/{cluster_id}/user: get: operationId: kubernetes_get_clusterUser summary: Retrieve User Information for a Kubernetes Cluster description: 'To show information the user associated with a Kubernetes cluster, send a GET request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/user`. ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' responses: '200': $ref: '#/components/responses/cluster_user' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/user\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.get_cluster_user(cluster_id="da8fda8")' security: - bearer_auth: - kubernetes:read /v2/kubernetes/options: get: operationId: kubernetes_list_options summary: List Available Regions, Node Sizes, and Versions of Kubernetes description: To list the versions of Kubernetes available for use, the regions that support Kubernetes, and the available node sizes, send a GET request to `/v2/kubernetes/options`. tags: - Kubernetes responses: '200': $ref: '#/components/responses/all_options' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/options\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n options, _, err := client.Kubernetes.GetOptions(ctx)\n}" - lang: Ruby source: 'require ''droplet_kit'' token = ENV[''DIGITALOCEAN_TOKEN''] client = DropletKit::Client.new(access_token: token) client.kubernetes_options.all' - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.list_options()' security: - bearer_auth: - kubernetes:read /v2/kubernetes/clusters/{cluster_id}/clusterlint: post: operationId: kubernetes_run_clusterLint summary: Run Clusterlint Checks on a Kubernetes Cluster description: 'Clusterlint helps operators conform to Kubernetes best practices around resources, security and reliability to avoid common problems while operating or upgrading the clusters. To request a clusterlint run on your cluster, send a POST request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint`. This will run all checks present in the `doks` group by default, if a request body is not specified. Optionally specify the below attributes. For information about the available checks, please refer to [the clusterlint check documentation](https://github.com/digitalocean/clusterlint/blob/master/checks.md). ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' requestBody: content: application/json: schema: $ref: '#/components/schemas/clusterlint_request' responses: '202': $ref: '#/components/responses/clusterlint_run' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"include_groups\": [\"basic\"], \"include_checks\": [\"bare-pods\"]}' \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/clusterlint\"" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"include_groups\": [\n \"basic\",\n \"doks\",\n \"security\"\n ],\n \"include_checks\": [\n \"bare-pods\",\n \"resource-requirements\"\n ],\n \"exclude_groups\": [\n \"workload-health\"\n ],\n \"exclude_checks\": [\n \"default-namespace\"\n ]\n}\n\nresp = client.kubernetes.run_cluster_lint(cluster_id=\"1fd32a\", body=req)" security: - bearer_auth: - kubernetes:create get: operationId: kubernetes_get_clusterLintResults summary: Fetch Clusterlint Diagnostics for a Kubernetes Cluster description: 'To request clusterlint diagnostics for your cluster, send a GET request to `/v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint`. If the `run_id` query parameter is provided, then the diagnostics for the specific run is fetched. By default, the latest results are shown. To find out how to address clusterlint feedback, please refer to [the clusterlint check documentation](https://github.com/digitalocean/clusterlint/blob/master/checks.md). ' tags: - Kubernetes parameters: - $ref: '#/components/parameters/kubernetes_cluster_id' - $ref: '#/components/parameters/clusterlint_run_id' responses: '200': $ref: '#/components/responses/clusterlint_results' '401': $ref: '#/components/responses/unauthorized' '404': $ref: '#/components/responses/not_found' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X GET \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n \"https://api.digitalocean.com/v2/kubernetes/clusters/bd5f5959-5e1e-4205-a714-a914373942af/clusterlint\"" - lang: Python source: 'import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.kubernetes.get_cluster_lint_results(cluster_id="da8fda8")' security: - bearer_auth: - kubernetes:read /v2/kubernetes/registry: post: operationId: kubernetes_add_registry summary: Add Container Registry to Kubernetes Clusters description: To integrate the container registry with Kubernetes clusters, send a POST request to `/v2/kubernetes/registry`. tags: - Kubernetes requestBody: content: application/json: schema: $ref: '#/components/schemas/cluster_registries' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"cluster_uuids\": [\"bd5f5959-5e1e-4205-a714-a914373942af\", \"50c2f44c-011d-493e-aee5-361a4a0d1844\"]}' \\\n \"https://api.digitalocean.com/v2/kubernetes/registry\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, err := client.Kubernetes.AddRegistry(ctx, &godo.KubernetesClusterRegistryRequest{ClusterUUIDs: []string{\"bd5f5959-5e1e-4205-a714-a914373942af\"}})\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"cluster_uuids\": [\n \"bd5f5959-5e1e-4205-a714-a914373942af\",\n \"50c2f44c-011d-493e-aee5-361a4a0d1844\"\n ]\n}\n\nresp = client.kubernetes.add_registry(body=req)" security: - bearer_auth: - kubernetes:create delete: operationId: kubernetes_remove_registry summary: Remove Container Registry from Kubernetes Clusters description: To remove the container registry from Kubernetes clusters, send a DELETE request to `/v2/kubernetes/registry`. tags: - Kubernetes requestBody: content: application/json: schema: $ref: '#/components/schemas/cluster_registries' responses: '204': $ref: '#/components/responses/no_content' '401': $ref: '#/components/responses/unauthorized' '429': $ref: '#/components/responses/too_many_requests' '500': $ref: '#/components/responses/server_error' default: $ref: '#/components/responses/unexpected_error' x-codeSamples: - lang: cURL source: "curl -X DELETE \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $DIGITALOCEAN_TOKEN\" \\\n -d '{\"cluster_uuids\": [\"bd5f5959-5e1e-4205-a714-a914373942af\", \"50c2f44c-011d-493e-aee5-361a4a0d1844\"]}' \\\n \"https://api.digitalocean.com/v2/kubernetes/registry\"" - lang: Go source: "import (\n \"context\"\n \"os\"\n\n \"github.com/digitalocean/godo\"\n)\n\nfunc main() {\n token := os.Getenv(\"DIGITALOCEAN_TOKEN\")\n\n client := godo.NewFromToken(token)\n ctx := context.TODO()\n\n _, err := client.Kubernetes.RemoveRegistry(ctx, &godo.KubernetesClusterRegistryRequest{ClusterUUIDs: []string{\"bd5f5959-5e1e-4205-a714-a914373942af\"}})\n}" - lang: Python source: "import os\nfrom pydo import Client\n\nclient = Client(token=os.environ.get(\"DIGITALOCEAN_TOKEN\"))\n\nreq = {\n \"cluster_uuids\": [\n \"bd5f5959-5e1e-4205-a714-a914373942af\",\n \"50c2f44c-011d-493e-aee5-361a4a0d1844\"\n ]\n}\n\nresp = client.kubernetes.remove_registry(body=req)" security: - bearer_auth: - kubernetes:delete components: schemas: kubernetes_version: type: object properties: slug: type: string example: 1.16.13-do.0 description: The slug identifier for an available version of Kubernetes for use when creating or updating a cluster. The string contains both the upstream version of Kubernetes as well as the DigitalOcean revision. kubernetes_version: type: string example: 1.16.13 description: The upstream version string for the version of Kubernetes provided by a given slug. supported_features: type: array items: type: string example: - cluster-autoscaler - docr-integration - token-authentication description: The features available with the version of Kubernetes provided by a given slug. cluster_registries: type: object properties: cluster_uuids: type: array items: type: string example: - bd5f5959-5e1e-4205-a714-a914373942af - 50c2f44c-011d-493e-aee5-361a4a0d1844 description: An array containing the UUIDs of Kubernetes clusters. link_to_prev_page: type: object properties: prev: description: URI of the previous page of the results. type: string example: https://api.digitalocean.com/v2/images?page=1 link_to_last_page: type: object properties: last: description: URI of the last page of the results. type: string example: https://api.digitalocean.com/v2/images?page=2 page_links: type: object properties: pages: anyOf: - $ref: '#/components/schemas/forward_links' - $ref: '#/components/schemas/backward_links' - {} example: pages: first: https://api.digitalocean.com/v2/account/keys?page=1 prev: https://api.digitalocean.com/v2/account/keys?page=2 kubernetes_options: type: object properties: options: properties: regions: type: array items: $ref: '#/components/schemas/kubernetes_region' versions: type: array items: $ref: '#/components/schemas/kubernetes_version' sizes: type: array items: $ref: '#/components/schemas/kubernetes_size' control_plane_firewall: type: object nullable: true description: An object specifying the control plane firewall for the Kubernetes cluster. Control plane firewall is in early availability (invite only). properties: enable: type: boolean description: Indicates whether the control plane firewall is enabled. example: true allowed_addresses: type: array description: An array of public addresses (IPv4 or CIDR) allowed to access the control plane. items: type: string example: - 1.2.3.4/32 - 1.1.0.0/16 kubernetes_size: type: object properties: name: type: string example: s-1vcpu-2gb description: A Droplet size available for use in a Kubernetes node pool. slug: type: string example: s-1vcpu-2gb description: The identifier for a size for use when creating a new cluster. clusterlint_results: type: object properties: run_id: type: string example: 50c2f44c-011d-493e-aee5-361a4a0d1844 description: Id of the clusterlint run that can be used later to fetch the diagnostics. requested_at: type: string format: date-time example: '2019-10-30T05:34:07Z' description: A time value given in ISO8601 combined date and time format that represents when the schedule clusterlint run request was made. completed_at: type: string format: date-time example: '2019-10-30T05:34:11Z' description: A time value given in ISO8601 combined date and time format that represents when the schedule clusterlint run request was completed. diagnostics: description: An array of diagnostics reporting potential problems for the given cluster. type: array items: type: object properties: check_name: type: string example: unused-config-map description: The clusterlint check that resulted in the diagnostic. severity: type: string example: warning description: Can be one of error, warning or suggestion. message: type: string example: Unused config map description: Feedback about the object for users to fix. object: type: object description: Metadata about the Kubernetes API object the diagnostic is reported on. properties: name: type: string example: foo description: Name of the object kind: type: string example: config map description: The kind of Kubernetes API object namespace: type: string example: kube-system description: The namespace the object resides in the cluster. clusterlint_request: type: object properties: include_groups: type: array items: type: string example: - basic - doks - security description: An array of check groups that will be run when clusterlint executes checks. include_checks: type: array items: type: string example: - bare-pods - resource-requirements description: An array of checks that will be run when clusterlint executes checks. exclude_groups: type: array items: type: string example: - workload-health description: An array of check groups that will be omitted when clusterlint executes checks. exclude_checks: type: array items: type: string example: - default-namespace description: An array of checks that will be run when clusterlint executes checks. node: type: object properties: id: type: string format: uuid example: e78247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f description: A unique ID that can be used to identify and reference the node. name: type: string example: adoring-newton-3niq description: An automatically generated, human-readable name for the node. status: type: object description: An object containing a `state` attribute whose value is set to a string indicating the current status of the node. properties: state: type: string enum: - provisioning - running - draining - deleting example: provisioning description: A string indicating the current status of the node. droplet_id: type: string example: '205545370' description: The ID of the Droplet used for the worker node. created_at: type: string format: date-time example: '2018-11-15T16:00:11Z' description: A time value given in ISO8601 combined date and time format that represents when the node was created. updated_at: type: string format: date-time example: '2018-11-15T16:00:11Z' description: A time value given in ISO8601 combined date and time format that represents when the node was last updated. associated_kubernetes_resources: type: object description: An object containing the IDs of resources associated with a Kubernetes cluster. properties: load_balancers: type: array items: $ref: '#/components/schemas/associated_kubernetes_resource' example: - id: 4de7ac8b-495b-4884-9a69-1050c6793cd6 name: lb-001 description: A list of names and IDs for associated load balancers that can be destroyed along with the cluster. volumes: type: array items: $ref: '#/components/schemas/associated_kubernetes_resource' example: - id: ba49449a-7435-11ea-b89e-0a58ac14480f name: volume-001 description: A list of names and IDs for associated volumes that can be destroyed along with the cluster. volume_snapshots: type: array items: $ref: '#/components/schemas/associated_kubernetes_resource' example: - id: edb0478d-7436-11ea-86e6-0a58ac144b91 name: snapshot-001 description: A list of names and IDs for associated volume snapshots that can be destroyed along with the cluster. associated_kubernetes_resource: type: object properties: id: type: string description: The ID of a resource associated with a Kubernetes cluster. example: edb0478d-7436-11ea-86e6-0a58ac144b91 name: type: string description: The name of a resource associated with a Kubernetes cluster. example: volume-001 kubernetes_node_pool_taint: type: object properties: key: type: string example: priority description: An arbitrary string. The `key` and `value` fields of the `taint` object form a key-value pair. For example, if the value of the `key` field is "special" and the value of the `value` field is "gpu", the key value pair would be `special=gpu`. value: type: string example: high description: An arbitrary string. The `key` and `value` fields of the `taint` object form a key-value pair. For example, if the value of the `key` field is "special" and the value of the `value` field is "gpu", the key value pair would be `special=gpu`. effect: type: string enum: - NoSchedule - PreferNoSchedule - NoExecute example: NoSchedule description: How the node reacts to pods that it won't tolerate. Available effect values are `NoSchedule`, `PreferNoSchedule`, and `NoExecute`. maintenance_policy: type: object nullable: true description: An object specifying the maintenance window policy for the Kubernetes cluster. properties: start_time: type: string example: '12:00' description: The start time in UTC of the maintenance window policy in 24-hour clock format / HH:MM notation (e.g., `15:00`). duration: type: string readOnly: true example: 4h0m0s description: The duration of the maintenance window policy in human-readable format. day: type: string enum: - any - monday - tuesday - wednesday - thursday - friday - saturday - sunday example: any description: The day of the maintenance window policy. May be one of `monday` through `sunday`, or `any` to indicate an arbitrary week day. kubernetes_node_pool_size: type: object properties: size: type: string example: s-1vcpu-2gb description: The slug identifier for the type of Droplet used as workers in the node pool. forward_links: allOf: - $ref: '#/components/schemas/link_to_last_page' - $ref: '#/components/schemas/link_to_next_page' user: type: object properties: kubernetes_cluster_user: type: object properties: username: type: string format: email example: sammy@digitalocean.com description: The username for the cluster admin user. groups: type: array items: type: string example: - k8saas:authenticated description: A list of in-cluster groups that the user belongs to. cluster: type: object properties: id: type: string format: uuid readOnly: true example: bd5f5959-5e1e-4205-a714-a914373942af description: A unique ID that can be used to identify and reference a Kubernetes cluster. name: type: string example: prod-cluster-01 description: A human-readable name for a Kubernetes cluster. region: type: string example: nyc1 description: The slug identifier for the region where the Kubernetes cluster is located. version: type: string example: 1.18.6-do.0 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. cluster_subnet: type: string format: cidr example: 192.168.0.0/20 description: The range of IP addresses for the overlay network of the Kubernetes cluster in CIDR notation. service_subnet: type: string format: cidr example: 192.168.16.0/24 description: The range of assignable IP addresses for services running in the Kubernetes cluster in CIDR notation. vpc_uuid: type: string format: uuid example: c33931f2-a26a-4e61-b85c-4e95a2ec431b description: A string specifying the UUID of the VPC to which the Kubernetes cluster is assigned. ipv4: type: string readOnly: true example: 68.183.121.157 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+) endpoint: type: string readOnly: true example: https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com description: The base URL of the API server on the Kubernetes master node. tags: type: array items: type: string example: - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - production - web-team description: An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged `k8s` and `k8s:$K8S_CLUSTER_ID`. node_pools: type: array description: An object specifying the details of the worker nodes available to the Kubernetes cluster. items: $ref: '#/components/schemas/kubernetes_node_pool' maintenance_policy: $ref: '#/components/schemas/maintenance_policy' auto_upgrade: type: boolean default: false example: true description: A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. status: type: object readOnly: true description: An object containing a `state` attribute whose value is set to a string indicating the current status of the cluster. properties: state: type: string enum: - running - provisioning - degraded - error - deleted - upgrading - deleting example: provisioning description: A string indicating the current status of the cluster. message: type: string example: provisioning description: An optional message providing additional information about the current cluster state. created_at: type: string format: date-time readOnly: true example: '2018-11-15T16:00:11Z' description: A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was created. updated_at: type: string format: date-time example: '2018-11-15T16:00:11Z' readOnly: true description: A time value given in ISO8601 combined date and time format that represents when the Kubernetes cluster was last updated. surge_upgrade: type: boolean default: false example: true 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. ha: type: boolean default: false example: true 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. registry_enabled: type: boolean readOnly: true example: true description: A read-only boolean value indicating if a container registry is integrated with the cluster. control_plane_firewall: $ref: '#/components/schemas/control_plane_firewall' required: - name - region - version - node_pools pagination: type: object properties: links: $ref: '#/components/schemas/page_links' link_to_first_page: type: object properties: first: description: URI of the first page of the results. type: string example: https://api.digitalocean.com/v2/images?page=1 cluster_update: type: object properties: name: type: string example: prod-cluster-01 description: A human-readable name for a Kubernetes cluster. tags: type: array items: type: string example: - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - production - web-team description: An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged `k8s` and `k8s:$K8S_CLUSTER_ID`. maintenance_policy: $ref: '#/components/schemas/maintenance_policy' auto_upgrade: type: boolean default: false example: true description: A boolean value indicating whether the cluster will be automatically upgraded to new patch releases during its maintenance window. surge_upgrade: type: boolean default: false example: true 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. ha: type: boolean default: false example: true 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. control_plane_firewall: $ref: '#/components/schemas/control_plane_firewall' required: - name error: type: object properties: id: description: A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." type: string example: not_found message: description: A message providing additional information about the error, including details to help resolve it when possible. type: string example: The resource you were accessing could not be found. request_id: description: Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. type: string example: 4d9d8375-3c56-4925-a3e7-eb137fed17e9 required: - id - message backward_links: allOf: - $ref: '#/components/schemas/link_to_first_page' - $ref: '#/components/schemas/link_to_prev_page' kubernetes_node_pool_update: type: object allOf: - $ref: '#/components/schemas/kubernetes_node_pool_base' required: - name - count kubernetes_region: type: object properties: name: type: string example: New York 3 description: A DigitalOcean region where Kubernetes is available. slug: type: string example: nyc3 description: The identifier for a region for use when creating a new cluster. meta_properties: type: object description: Information about the response itself. properties: total: description: Number of objects returned by the request. type: integer example: 1 meta: type: object properties: meta: allOf: - $ref: '#/components/schemas/meta_properties' - required: - total required: - meta kubernetes_node_pool: type: object allOf: - $ref: '#/components/schemas/kubernetes_node_pool_size' - $ref: '#/components/schemas/kubernetes_node_pool_base' required: - name - size - count kubernetes_node_pool_base: type: object properties: id: type: string format: uuid readOnly: true example: cdda885e-7663-40c8-bc74-3a036c66545d description: A unique ID that can be used to identify and reference a specific node pool. name: type: string example: frontend-pool description: A human-readable name for the node pool. count: type: integer example: 3 description: The number of Droplet instances in the node pool. tags: type: array items: type: string example: - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s-worker - production - web-team 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`. labels: type: object nullable: true example: null 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. taints: type: array items: $ref: '#/components/schemas/kubernetes_node_pool_taint' 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. auto_scale: type: boolean example: true description: A boolean value indicating whether auto-scaling is enabled for this node pool. min_nodes: type: integer example: 3 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`. max_nodes: type: integer example: 6 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`. nodes: type: array readOnly: true description: An object specifying the details of a specific worker node in a node pool. items: $ref: '#/components/schemas/node' credentials: type: object properties: server: type: string format: uri example: https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com description: The URL used to access the cluster API server. certificate_authority_data: type: string format: byte example: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURKekNDQWcrZ0F3SUJBZ0lDQm5Vd0RRWUpLb1pJaHZjTkFRRUxCUUF3TXpFVk1CTUdBMVVFQ2hNTVJHbG4KYVhSaGJFOWpaV0Z1TVJvd0dBWURWUVFERXhGck9ITmhZWE1nUTJ4MWMzUmxjaUJEUVRBZUZ3MHlNREE0TURNeApOVEkxTWpoYUZ3MDBNREE0TURNeE5USTFNamhhTURNeEZUQVRCZ05WQkFvVERFUnBaMmwwWVd4UFkyVmhiakVhCk1CZ0dBMVVFQXhNUmF6aHpZV0Z6SUVOc2RYTjBaWElnUTBFd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUIKRHdBd2dnRUtBb0lCQVFDc21oa2JrSEpUcGhZQlN0R05VVE1ORVZTd2N3bmRtajArelQvcUZaNGsrOVNxUnYrSgpBd0lCaGpBU0JnTlZIUk1CQWY4RUNEQUdBUUgvQWdFQU1CMEdBMVVkRGdRV0JCUlRzazhhZ1hCUnFyZXdlTXJxClhwa3E1NXg5dVRBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQVFFQXB6V2F6bXNqYWxXTEx3ZjVpbWdDblNINDlKcGkKYWkvbzFMdEJvVEpleGdqZzE1ZVppaG5BMUJMc0lWNE9BZGM3UEFsL040L0hlbENrTDVxandjamRnNVdaYnMzYwozcFVUQ0g5bVVwMFg1SVdhT1VKV292Q1hGUlM1R2VKYXlkSDVPUXhqTURzR2N2UlNvZGQrVnQ2MXE3aWdFZ2I1CjBOZ1l5RnRnc2p0MHpJN3hURzZFNnlsOVYvUmFoS3lIQks2eExlM1RnUGU4SXhWa2RwT3QzR0FhSDRaK0pLR3gKYisyMVZia1NnRE1QQTlyR0VKNVZwVXlBV0FEVXZDRVFHV0hmNGpQN2ZGZlc3T050S0JWY3h3YWFjcVBVdUhzWApwRG5DZVR3V1NuUVp6L05xNmQxWUtsMFdtbkwzTEowemJzRVFGbEQ4MkkwL09MY2dZSDVxMklOZHhBPT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= description: A base64 encoding of bytes representing the certificate authority data for accessing the cluster. client_certificate_data: type: string format: byte deprecated: true nullable: true example: null description: 'A base64 encoding of bytes representing the x509 client certificate data for access the cluster. This is only returned for clusters without support for token-based authentication. Newly created Kubernetes clusters do not return credentials using certificate-based authentication. For additional information, [see here](https://docs.digitalocean.com/products/kubernetes/how-to/connect-to-cluster/#authenticate). ' client_key_data: type: string format: byte deprecated: true nullable: true example: null description: 'A base64 encoding of bytes representing the x509 client key data for access the cluster. This is only returned for clusters without support for token-based authentication. Newly created Kubernetes clusters do not return credentials using certificate-based authentication. For additional information, [see here](https://docs.digitalocean.com/products/kubernetes/how-to/connect-to-cluster/#authenticate). ' token: type: string example: $DIGITALOCEAN_TOKEN description: An access token used to authenticate with the cluster. This is only returned for clusters with support for token-based authentication. expires_at: type: string format: date-time example: '2019-11-09T11:50:28.889080521Z' description: A time value given in ISO8601 combined date and time format that represents when the access token expires. destroy_associated_kubernetes_resources: type: object description: An object containing the IDs of resources to be destroyed along with their associated with a Kubernetes cluster. properties: load_balancers: type: array items: type: string example: - 4de7ac8b-495b-4884-9a69-1050c6793cd6 description: A list of IDs for associated load balancers to destroy along with the cluster. volumes: type: array items: type: string example: - ba49449a-7435-11ea-b89e-0a58ac14480f description: A list of IDs for associated volumes to destroy along with the cluster. volume_snapshots: type: array items: type: string example: - edb0478d-7436-11ea-86e6-0a58ac144b91 description: A list of IDs for associated volume snapshots to destroy along with the cluster. link_to_next_page: type: object properties: next: description: URI of the next page of the results. type: string example: https://api.digitalocean.com/v2/images?page=2 responses: credentials: description: A JSON object containing credentials for a cluster. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/credentials' existing_cluster: description: 'The response will be a JSON object with a key called `kubernetes_cluster`. The value of this will be an object containing the standard attributes of a Kubernetes cluster. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: kubernetes_cluster: $ref: '#/components/schemas/cluster' examples: Single Kubernetes Cluster: $ref: '#/components/examples/kubernetes_single' no_content: description: The action was successful and the response body is empty. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' all_clusters: description: 'The response will be a JSON object with a key called `kubernetes_clusters`. This will be set to an array of objects, each of which will contain the standard Kubernetes cluster attributes. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: allOf: - type: object properties: kubernetes_clusters: type: array items: $ref: '#/components/schemas/cluster' - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/meta' examples: All Kubernetes Clusters: $ref: '#/components/examples/kubernetes_clusters_all' cluster_user: description: 'The response will be a JSON object with a key called `kubernetes_cluster_user` containing the username and in-cluster groups that it belongs to. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/user' node_pool_update: description: 'The response will be a JSON object with a key called `node_pool`. The value of this will be an object containing the standard attributes of a node pool. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: node_pool: $ref: '#/components/schemas/kubernetes_node_pool' example: node_pool: id: cdda885e-7663-40c8-bc74-3a036c66545d name: renamed-pool size: s-1vcpu-2gb count: 3 tags: - production - web-team - front-end - new-tag - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: null taints: [] auto_scale: true min_nodes: 3 max_nodes: 6 nodes: - id: 478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f name: adoring-newton-3niq status: state: running droplet_id: '205545370' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: ad12e744-c2a9-473d-8aa9-be5680500eb1 name: adoring-newton-3nim status: state: running droplet_id: '205545371' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: e46e8d07-f58f-4ff1-9737-97246364400e name: adoring-newton-3ni7 status: state: running droplet_id: '205545372' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' existing_node_pool: description: 'The response will be a JSON object with a key called `node_pool`. The value of this will be an object containing the standard attributes of a node pool. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: node_pool: $ref: '#/components/schemas/kubernetes_node_pool' example: node_pool: id: cdda885e-7663-40c8-bc74-3a036c66545d name: frontend-pool size: s-1vcpu-2gb count: 3 tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: service: backend priority: high taints: - key: priority value: high effect: NoSchedule auto_scale: false min_nodes: 0 max_nodes: 0 nodes: - id: 478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f name: adoring-newton-3niq status: state: running droplet_id: '205545370' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: ad12e744-c2a9-473d-8aa9-be5680500eb1 name: adoring-newton-3nim status: state: running droplet_id: '205545371' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: e46e8d07-f58f-4ff1-9737-97246364400e name: adoring-newton-3ni7 status: state: running droplet_id: '205545372' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' server_error: description: Server error. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: server_error message: Unexpected server-side error kubeconfig: description: A kubeconfig file for the cluster in YAML format. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/yaml: example: "apiVersion: v1\nclusters:\n- cluster:\n certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURUxCUUF3TXpFVk1CTUdBMVVFQ2ftTVJHbG4KYVhSaGJFOWpaV0Z1TVJvd0dUSREERXhGck9ITmhZWE1nUTJ4MWMzUmxjaUJEUVRBZUZ3MHhPREV4TVRVeApOakF3TWpCYUZ3MHpPREV4TVRVeE5qQXdNakJhTURNeEZUQVRCZ05WQkFvVERFUnBaMmwwWVd4UFkyVmhiakVhCk1CZ0dBMVVFQXhNUmF6aHpZV0Z6SUVOc2RYTjBaWElnUTBFd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUIKRHdBd2dnRUtBb0lCQVFDK2Z0L05Nd3pNaUxFZlFvTFU2bDgrY0hMbWttZFVKdjl4SmlhZUpIU0dZOGhPZFVEZQpGd1Zoc0pDTnVFWkpJUFh5Y0orcGpkU3pYc1lFSE03WVNKWk9xNkdaYThPMnZHUlJjN2ZQaUFJaFBRK0ZpUmYzCmRhMHNIUkZlM2hCTmU5ZE5SeTliQ2VCSTRSUlQrSEwzRFR3L2I5KytmRkdZQkRoVTEvTTZUWWRhUHR3WU0rdWgKb1pKcWJZVGJZZTFhb3R1ekdnYUpXaXRhdFdHdnNJYU8xYWthdkh0WEIOOHFxa2lPemdrSDdvd3RVY3JYM05iawozdmlVeFU4TW40MmlJaGFyeHNvTnlwdGhHOWZLMi9OdVdKTXJJS2R0Mzhwc0tkdDBFbng0MWg5K0dsMjUzMzhWCk1mdjBDVDF6SG1JanYwblIrakNkcFd0eFVLRyt0YjYzZFhNbkFnTUJBQUdqUlRCRE1BNEdBMVVkRHdFQi93UUUKQXdJQmhqQVNCZ05WSFJNQkFmOEVDREFHQVFIL0FnRUFNQjBHQTFVZERnUVdCQlNQMmJrOXJiUGJpQnZOd1Z1NQpUL0dwTFdvOTdEQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFEVjFMSGZyc1JiYVdONHE5SnBFVDMxMlluRDZ6Cm5rM3BpU1ZSYVEvM09qWG8wdHJ6Z2N4KzlVTUQxeDRHODI1RnYxc0ROWUExZEhFc2dHUmNyRkVmdGZJQWUrUVYKTitOR3NMRnQrOGZrWHdnUlpoNEU4ZUJsSVlrdEprOWptMzFMT25vaDJYZno0aGs3VmZwYkdvVVlsbmVoak1JZApiL3ZMUk05Y2EwVTJlYTB5OTNveE5pdU9PcXdrZGFjU1orczJtb3JNdGZxc3VRSzRKZDA3SENIbUFIeWpXT2k4ClVOQVUyTnZnSnBKY2RiZ3VzN2I5S3ppR1ZERklFUk04cEo4U1Nob1ZvVFFJd3d5Y2xVTU9EUUJreFFHOHNVRk8KRDE3ZjRod1dNbW5qVHY2MEJBM0dxaTZRcjdsWVFSL3drSEtQcnZjMjhoNXB0NndPWEY1b1M4OUZkUT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\n server: https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com\n name: do-nyc1-prod-cluster-01\ncontexts:\n- context:\n cluster: do-nyc1-prod-cluster-01\n user: do-nyc1-prod-cluster-01-admin\n name: do-nyc1-prod-cluster-01\ncurrent-context: do-nyc1-prod-cluster-01\nkind: Config\npreferences: {}\nusers:\n- name: do-nyc1-prod-cluster-01-admin\n user:\n token: 403d085aaa80102277d8da97ffd2db2b6a4f129d0e2146098fdfb0cec624babc\n" associated_kubernetes_resources_list: description: The response will be a JSON object containing `load_balancers`, `volumes`, and `volume_snapshots` keys. Each will be set to an array of objects containing the standard attributes for associated resources. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/associated_kubernetes_resources' available_upgrades: description: 'The response will be a JSON object with a key called `available_upgrade_versions`. The value of this will be an array of objects, representing the upgrade versions currently available for this cluster. If the cluster is up-to-date (i.e. there are no upgrades currently available) `available_upgrade_versions` will be `null`. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: type: object properties: available_upgrade_versions: type: array nullable: true items: $ref: '#/components/schemas/kubernetes_version' unauthorized: description: Unauthorized headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: unauthorized message: Unable to authenticate you. node_pool_create: description: 'The response will be a JSON object with a key called `node_pool`. The value of this will be an object containing the standard attributes of a node pool. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: node_pool: $ref: '#/components/schemas/kubernetes_node_pool' example: node_pool: id: cdda885e-7663-40c8-bc74-3a036c66545d name: new-pool size: s-1vcpu-2gb count: 3 tags: - production - web-team - front-end - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: null taints: [] auto_scale: true min_nodes: 3 max_nodes: 6 nodes: - id: 478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f name: ' ' status: state: provisioning droplet_id: ' ' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: ad12e744-c2a9-473d-8aa9-be5680500eb1 name: ' ' status: state: provisioning droplet_id: ' ' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: e46e8d07-f58f-4ff1-9737-97246364400e name: ' ' status: state: provisioning droplet_id: ' ' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' clusterlint_run: description: The response is a JSON object with a key called `run_id` that you can later use to fetch the run results. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: run_id: type: string example: 50c2f44c-011d-493e-aee5-361a4a0d1844 description: ID of the clusterlint run that can be used later to fetch the diagnostics. updated_cluster: description: 'The response will be a JSON object with a key called `kubernetes_cluster`. The value of this will be an object containing the standard attributes of a Kubernetes cluster. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: kubernetes_cluster: $ref: '#/components/schemas/cluster' examples: Updated Kubernetes Cluster: $ref: '#/components/examples/kubernetes_updated' all_node_pools: description: 'The response will be a JSON object with a key called `node_pools`. This will be set to an array of objects, each of which will contain the standard node pool attributes. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: node_pools: type: array items: $ref: '#/components/schemas/kubernetes_node_pool' example: node_pools: - id: cdda885e-7663-40c8-bc74-3a036c66545d name: frontend-pool size: s-1vcpu-2gb count: 3 tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: null auto_scale: false min_nodes: 0 max_nodes: 0 nodes: - id: 478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f name: adoring-newton-3niq status: state: running droplet_id: '205545370' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: ad12e744-c2a9-473d-8aa9-be5680500eb1 name: adoring-newton-3nim status: state: running droplet_id: '205545371' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: e46e8d07-f58f-4ff1-9737-97246364400e name: adoring-newton-3ni7 status: state: running droplet_id: '205545372' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: f49f4379-7e7f-4af5-aeb6-0354bd840778 name: backend-pool size: g-4vcpu-16gb count: 2 tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: service: backend priority: high auto_scale: true min_nodes: 2 max_nodes: 5 nodes: - id: 3385619f-8ec3-42ba-bb23-8d21b8ba7518 name: affectionate-nightingale-3nif status: state: running droplet_id: '205545373' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: 4b8f60ff-ba06-4523-a6a4-b8148244c7e6 name: affectionate-nightingale-3niy status: state: running droplet_id: '205545374' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' all_options: description: 'The response will be a JSON object with a key called `options` which contains `regions`, `versions`, and `sizes` objects listing the available options and the matching slugs for use when creating a new cluster. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/kubernetes_options' examples: All Kubernetes Options: $ref: '#/components/examples/kubernetes_options' not_found: description: The resource was not found. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: not_found message: The resource you requested could not be found. cluster_create: description: 'The response will be a JSON object with a key called `kubernetes_cluster`. The value of this will be an object containing the standard attributes of a Kubernetes cluster. The IP address and cluster API server endpoint will not be available until the cluster has finished provisioning. The initial value of the cluster''s `status.state` attribute will be `provisioning`. When the cluster is ready, this will transition to `running`. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: properties: kubernetes_cluster: $ref: '#/components/schemas/cluster' examples: Kubernetes Cluster Response: $ref: '#/components/examples/kubernetes_clusters_create_basic_response' Kubernetes Cluster with Multiple Node Pools Response: $ref: '#/components/examples/kubernetes_clusters_multi_pool_response' accepted: description: The does not indicate the success or failure of any operation, just that the request has been accepted for processing. headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' too_many_requests: description: API Rate limit exceeded headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: too_many_requests message: API Rate limit exceeded. unexpected_error: description: Unexpected error headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/error' example: id: example_error message: some error message clusterlint_results: description: 'The response is a JSON object which contains the diagnostics on Kubernetes objects in the cluster. Each diagnostic will contain some metadata information about the object and feedback for users to act upon. ' headers: ratelimit-limit: $ref: '#/components/headers/ratelimit-limit' ratelimit-remaining: $ref: '#/components/headers/ratelimit-remaining' ratelimit-reset: $ref: '#/components/headers/ratelimit-reset' content: application/json: schema: $ref: '#/components/schemas/clusterlint_results' examples: kubernetes_options: value: options: regions: - name: New York 1 slug: nyc1 - name: Singapore 1 slug: sgp1 - name: London 1 slug: lon1 - name: New York 3 slug: nyc3 - name: Amsterdam 3 slug: ams3 - name: Frankfurt 1 slug: fra1 - name: Toronto 1 slug: tor1 - name: San Francisco 2 slug: sfo2 - name: Bangalore 1 slug: blr1 - name: San Francisco 3 slug: sfo3 versions: - slug: 1.18.8-do.0 kubernetes_version: 1.18.8 supported_features: - cluster-autoscaler - docr-integration - token-authentication - slug: 1.17.11-do.0 kubernetes_version: 1.17.11 supported_features: - cluster-autoscaler - docr-integration - token-authentication - slug: 1.16.14-do.0 kubernetes_version: 1.16.14 supported_features: - cluster-autoscaler - docr-integration - token-authentication sizes: - name: s-1vcpu-2gb slug: s-1vcpu-2gb - name: s-2vcpu-2gb slug: s-2vcpu-2gb - name: s-1vcpu-3gb slug: s-1vcpu-3gb - name: s-2vcpu-4gb slug: s-2vcpu-4gb - name: s-4vcpu-8gb slug: s-4vcpu-8gb - name: c-2-4GiB slug: c-2 - name: g-2vcpu-8gb slug: g-2vcpu-8gb - name: gd-2vcpu-8gb slug: gd-2vcpu-8gb - name: s-8vcpu-16gb slug: s-8vcpu-16gb - name: s-6vcpu-16gb slug: s-6vcpu-16gb - name: c-4-8GiB slug: c-4 - name: m-2vcpu-16gb slug: m-2vcpu-16gb - name: m3-2vcpu-16gb slug: m3-2vcpu-16gb - name: g-4vcpu-16gb slug: g-4vcpu-16gb - name: gd-4vcpu-16gb slug: gd-4vcpu-16gb - name: m6-2vcpu-16gb slug: m6-2vcpu-16gb - name: s-8vcpu-32gb slug: s-8vcpu-32gb - name: c-8-16GiB slug: c-8 - name: m-4vcpu-32gb slug: m-4vcpu-32gb - name: m3-4vcpu-32gb slug: m3-4vcpu-32gb - name: g-8vcpu-32gb slug: g-8vcpu-32gb - name: s-12vcpu-48gb slug: s-12vcpu-48gb - name: gd-8vcpu-32gb slug: gd-8vcpu-32gb - name: m6-4vcpu-32gb slug: m6-4vcpu-32gb - name: s-16vcpu-64gb slug: s-16vcpu-64gb - name: c-16 slug: c-16 - name: m-8vcpu-64gb slug: m-8vcpu-64gb - name: m3-8vcpu-64gb slug: m3-8vcpu-64gb - name: g-16vcpu-64gb slug: g-16vcpu-64gb - name: s-20vcpu-96gb slug: s-20vcpu-96gb - name: gd-16vcpu-64gb slug: gd-16vcpu-64gb - name: m6-8vcpu-64gb slug: m6-8vcpu-64gb - name: s-24vcpu-128gb slug: s-24vcpu-128gb - name: c-32-64GiB slug: c-32 - name: m-16vcpu-128gb slug: m-16vcpu-128gb - name: m3-16vcpu-128gb slug: m3-16vcpu-128gb - name: g-32vcpu-128gb slug: g-32vcpu-128gb - name: s-32vcpu-192gb slug: s-32vcpu-192gb - name: gd-32vcpu-128gb slug: gd-32vcpu-128gb - name: m-24vcpu-192gb slug: m-24vcpu-192gb - name: m6-16vcpu-128gb slug: m6-16vcpu-128gb - name: g-40vcpu-160gb slug: g-40vcpu-160gb - name: gd-40vcpu-160gb slug: gd-40vcpu-160gb - name: m3-24vcpu-192gb slug: m3-24vcpu-192gb - name: m-32vcpu-256gb slug: m-32vcpu-256gb - name: m6-24vcpu-192gb slug: m6-24vcpu-192gb - name: m3-32vcpu-256gb slug: m3-32vcpu-256gb - name: m6-32vcpu-256gb slug: m6-32vcpu-256gb kubernetes_updated: value: kubernetes_cluster: id: bd5f5959-5e1e-4205-a714-a914373942af name: prod-cluster-01 region: nyc1 version: 1.18.6-do.0 cluster_subnet: 10.244.0.0/16 service_subnet: 10.245.0.0/16 vpc_uuid: c33931f2-a26a-4e61-b85c-4e95a2ec431b ipv4: 68.183.121.157 endpoint: https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af node_pools: - id: cdda885e-7663-40c8-bc74-3a036c66545d name: frontend-pool size: s-1vcpu-2gb count: 3 tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: null taints: [] auto_scale: false min_nodes: 0 max_nodes: 0 nodes: - id: 478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f name: adoring-newton-3niq status: state: running droplet_id: '205545370' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: ad12e744-c2a9-473d-8aa9-be5680500eb1 name: adoring-newton-3nim status: state: running droplet_id: '205545371' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: e46e8d07-f58f-4ff1-9737-97246364400e name: adoring-newton-3ni7 status: state: running droplet_id: '205545372' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: f49f4379-7e7f-4af5-aeb6-0354bd840778 name: backend-pool size: g-4vcpu-16gb count: 2 tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: service: backend priority: high taints: [] auto_scale: true min_nodes: 2 max_nodes: 5 nodes: - id: 3385619f-8ec3-42ba-bb23-8d21b8ba7518 name: affectionate-nightingale-3nif status: state: running droplet_id: '205545373' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: 4b8f60ff-ba06-4523-a6a4-b8148244c7e6 name: affectionate-nightingale-3niy status: state: running droplet_id: '205545374' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' maintenance_policy: start_time: 00:00 duration: 4h0m0s day: any auto_upgrade: true status: state: running created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' surge_upgrade: true registry_enabled: false ha: false control_plane_firewall: enabled: true allowed_addresses: - 1.2.3.4/32 - 1.1.0.0/16 kubernetes_clusters_multi_pool_request: description: 'This example request creates a Kubernetes cluster with two node pools. It also demonstrates setting tags, labels, auto scaling, and a maintenance policy. ' value: name: prod-cluster-01 region: nyc1 version: 1.18.6-do.0 tags: - production - web-team node_pools: - size: s-1vcpu-2gb count: 3 name: frontend-pool tags: - frontend - size: g-4vcpu-16gb count: 2 name: backend-pool labels: service: backend priority: high auto_scale: true min_nodes: 2 max_nodes: 5 maintenance_policy: start_time: '12:00' day: any kubernetes_clusters_basic_request: value: name: prod-cluster-01 region: nyc1 version: 1.18.6-do.0 node_pools: - size: s-1vcpu-2gb count: 3 name: worker-pool kubernetes_clusters_create_basic_response: value: kubernetes_cluster: id: bd5f5959-5e1e-4205-a714-a914373942af name: prod-cluster-01 region: nyc1 version: 1.18.6-do.0 cluster_subnet: 10.244.0.0/16 service_subnet: 10.245.0.0/16 vpc_uuid: c33931f2-a26a-4e61-b85c-4e95a2ec431b ipv4: '' endpoint: '' tags: - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af node_pools: - id: cdda885e-7663-40c8-bc74-3a036c66545d name: worker-pool size: s-1vcpu-2gb count: 3 tags: - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: null taints: [] auto_scale: false min_nodes: 0 max_nodes: 0 nodes: - id: 478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f name: '' status: state: provisioning droplet_id: '' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: ad12e744-c2a9-473d-8aa9-be5680500eb1 name: '' status: state: provisioning droplet_id: '' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: e46e8d07-f58f-4ff1-9737-97246364400e name: '' status: state: provisioning droplet_id: '' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' maintenance_policy: start_time: 00:00 duration: 4h0m0s day: any auto_upgrade: false status: state: provisioning message: provisioning created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' surge_upgrade: false registry_enabled: false ha: false control_plane_firewall: enabled: true allowed_addresses: - 1.2.3.4/32 - 1.1.0.0/16 kubernetes_clusters_multi_pool_response: value: kubernetes_clusters: id: bd5f5959-5e1e-4205-a714-a914373942af name: prod-cluster-01 region: nyc1 version: 1.18.6-do.0 cluster_subnet: 10.244.0.0/16 service_subnet: 10.245.0.0/16 vpc_uuid: c33931f2-a26a-4e61-b85c-4e95a2ec431b ipv4: '' endpoint: '' tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af node_pools: - id: cdda885e-7663-40c8-bc74-3a036c66545d name: frontend-pool size: s-1vcpu-2gb count: 3 tags: - production - web-team - frontend - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: null taints: [] auto_scale: false min_nodes: 0 max_nodes: 0 nodes: - id: 478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f name: '' status: state: provisioning droplet_id: '' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: ad12e744-c2a9-473d-8aa9-be5680500eb1 name: '' status: state: provisioning droplet_id: '' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: e46e8d07-f58f-4ff1-9737-97246364400e name: '' status: state: provisioning droplet_id: '' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: f49f4379-7e7f-4af5-aeb6-0354bd840778 name: backend-pool size: g-4vcpu-16gb count: 2 tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: service: backend priority: high taints: [] auto_scale: true min_nodes: 2 max_nodes: 5 nodes: - id: 3385619f-8ec3-42ba-bb23-8d21b8ba7518 name: '' status: state: provisioning droplet_id: '' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: 4b8f60ff-ba06-4523-a6a4-b8148244c7e6 name: '' status: state: provisioning droplet_id: '' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' maintenance_policy: start_time: '12:00' duration: 4h0m0s day: any auto_upgrade: false status: state: provisioning message: provisioning created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' surge_upgrade: false registry_enabled: false ha: false control_plane_firewall: enabled: true allowed_addresses: - 1.2.3.4/32 - 1.1.0.0/16 kubernetes_clusters_all: value: kubernetes_clusters: - id: bd5f5959-5e1e-4205-a714-a914373942af name: prod-cluster-01 region: nyc1 version: 1.18.6-do.0 cluster_subnet: 10.244.0.0/16 service_subnet: 10.245.0.0/16 vpc_uuid: c33931f2-a26a-4e61-b85c-4e95a2ec431b ipv4: 68.183.121.157 endpoint: https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af node_pools: - id: cdda885e-7663-40c8-bc74-3a036c66545d name: frontend-pool size: s-1vcpu-2gb count: 3 tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: null taints: [] auto_scale: false min_nodes: 0 max_nodes: 0 nodes: - id: 478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f name: adoring-newton-3niq status: state: provisioning droplet_id: '205545370' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: ad12e744-c2a9-473d-8aa9-be5680500eb1 name: adoring-newton-3nim status: state: provisioning droplet_id: '205545371' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: e46e8d07-f58f-4ff1-9737-97246364400e name: adoring-newton-3ni7 status: state: provisioning droplet_id: '205545372' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: f49f4379-7e7f-4af5-aeb6-0354bd840778 name: backend-pool size: g-4vcpu-16gb count: 2 tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: service: backend priority: high taints: [] auto_scale: true min_nodes: 2 max_nodes: 5 nodes: - id: 3385619f-8ec3-42ba-bb23-8d21b8ba7518 name: affectionate-nightingale-3nif status: state: provisioning droplet_id: '205545373' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: 4b8f60ff-ba06-4523-a6a4-b8148244c7e6 name: affectionate-nightingale-3niy status: state: provisioning droplet_id: '205545374' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' maintenance_policy: start_time: 00:00 duration: 4h0m0s day: any auto_upgrade: false status: state: provisioning message: provisioning created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' surge_upgrade: false registry_enabled: false ha: false control_plane_firewall: enabled: true allowed_addresses: - 1.2.3.4/32 - 1.1.0.0/16 meta: total: 1 kubernetes_single: value: kubernetes_cluster: id: bd5f5959-5e1e-4205-a714-a914373942af name: prod-cluster-01 region: nyc1 version: 1.18.6-do.0 cluster_subnet: 10.244.0.0/16 service_subnet: 10.245.0.0/16 vpc_uuid: c33931f2-a26a-4e61-b85c-4e95a2ec431b ipv4: 68.183.121.157 endpoint: https://bd5f5959-5e1e-4205-a714-a914373942af.k8s.ondigitalocean.com tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af node_pools: - id: cdda885e-7663-40c8-bc74-3a036c66545d name: frontend-pool size: s-1vcpu-2gb count: 3 tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: null taints: [] auto_scale: false min_nodes: 0 max_nodes: 0 nodes: - id: 478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f name: adoring-newton-3niq status: state: running droplet_id: '205545370' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: ad12e744-c2a9-473d-8aa9-be5680500eb1 name: adoring-newton-3nim status: state: running droplet_id: '205545371' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: e46e8d07-f58f-4ff1-9737-97246364400e name: adoring-newton-3ni7 status: state: running droplet_id: '205545372' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: f49f4379-7e7f-4af5-aeb6-0354bd840778 name: backend-pool size: g-4vcpu-16gb count: 2 tags: - production - web-team - k8s - k8s:bd5f5959-5e1e-4205-a714-a914373942af - k8s:worker labels: service: backend priority: high taints: [] auto_scale: true min_nodes: 2 max_nodes: 5 nodes: - id: 3385619f-8ec3-42ba-bb23-8d21b8ba7518 name: affectionate-nightingale-3nif status: state: running droplet_id: '205545373' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' - id: 4b8f60ff-ba06-4523-a6a4-b8148244c7e6 name: affectionate-nightingale-3niy status: state: running droplet_id: '205545374' created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' maintenance_policy: start_time: 00:00 duration: 4h0m0s day: any auto_upgrade: false status: state: running created_at: '2018-11-15T16:00:11Z' updated_at: '2018-11-15T16:00:11Z' surge_upgrade: false registry_enabled: false ha: false control_plane_firewall: enabled: true allowed_addresses: - 1.2.3.4/32 - 1.1.0.0/16 headers: ratelimit-limit: schema: type: integer example: 5000 description: The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. ratelimit-reset: schema: type: integer example: 1444931833 description: The time when the oldest request will expire. The value is given in Unix epoch time. See https://developers.digitalocean.com/documentation/v2/#rate-limit for information about how requests expire. ratelimit-remaining: schema: type: integer example: 4816 description: The number of requests in your hourly quota that remain before you hit your request limit. See https://developers.digitalocean.com/documentation/v2/#rate-limit for information about how requests expire. parameters: kubernetes_cluster_id: in: path name: cluster_id description: A unique ID that can be used to reference a Kubernetes cluster. required: true schema: type: string format: uuid minimum: 1 example: bd5f5959-5e1e-4205-a714-a914373942af kubernetes_node_id: in: path name: node_id description: A unique ID that can be used to reference a node in a Kubernetes node pool. required: true schema: type: string format: uuid minimum: 1 example: 478247f8-b1bb-4f7a-8db9-2a5f8d4b8f8f clusterlint_run_id: in: query name: run_id description: Specifies the clusterlint run whose results will be retrieved. required: false schema: type: string format: uuid example: 50c2f44c-011d-493e-aee5-361a4a0d1844 per_page: in: query name: per_page required: false description: Number of items returned per page schema: type: integer minimum: 1 default: 20 maximum: 200 example: 2 kubernetes_expiry_seconds: in: query name: expiry_seconds required: false description: The duration in seconds that the returned Kubernetes credentials will be valid. If not set or 0, the credentials will have a 7 day expiry. schema: type: integer minimum: 0 default: 0 example: 300 kubernetes_node_skip_drain: in: query name: skip_drain required: false description: Specifies whether or not to drain workloads from a node before it is deleted. Setting it to `1` causes node draining to be skipped. Omitting the query parameter or setting its value to `0` carries out draining prior to deletion. schema: type: integer minimum: 0 maximum: 1 default: 0 example: 1 kubernetes_node_replace: in: query name: replace required: false description: Specifies whether or not to replace a node after it has been deleted. Setting it to `1` causes the node to be replaced by a new one after deletion. Omitting the query parameter or setting its value to `0` deletes without replacement. schema: type: integer minimum: 0 maximum: 1 default: 0 example: 1 page: in: query name: page required: false description: Which 'page' of paginated results to return. schema: type: integer minimum: 1 default: 1 example: 1 kubernetes_node_pool_id: in: path name: node_pool_id description: A unique ID that can be used to reference a Kubernetes node pool. required: true schema: type: string format: uuid minimum: 1 example: cdda885e-7663-40c8-bc74-3a036c66545d securitySchemes: bearer_auth: type: http scheme: bearer description: '## OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/) - `dor_v1_` for OAuth refresh tokens ### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. ### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. ### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` '