> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ankra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DigitalOcean Kubernetes (DOKS)

> Provision, import, and operate DigitalOcean Kubernetes (DOKS) clusters with Ankra - live pricing, node pools, upgrades, GitOps, and AI-assisted operations.

[DigitalOcean Kubernetes (DOKS)](https://www.digitalocean.com/products/kubernetes) is DigitalOcean's managed Kubernetes service. DigitalOcean runs the control plane; Ankra provisions the cluster, then manages everything on top - node pools, Kubernetes upgrades, addons, stacks, GitOps, and AI-assisted operations.

This page covers DOKS specifically. For the shared concepts across all managed providers - live options, discovery/import, and day-2 API patterns - see [Managed Kubernetes](/guides/managed-kubernetes).

## Why DOKS with Ankra

* **Live pricing and options** - regions, Kubernetes versions with support windows, and droplet sizes are fetched live with your DigitalOcean token, with a monthly cost summary as you build the cluster.
* **Highly available control plane** - opt into DigitalOcean's HA control plane at creation.
* **Full day-2 from the CLI, portal, or API** - add and scale node pools, upgrade Kubernetes, and manage addons and stacks the same way as any Ankra cluster.

## Prerequisites

A **DigitalOcean API token** with read/write, stored in Ankra. See [DigitalOcean API Credentials](/platform/credentials/digitalocean).

GitOps is optional: connect a repository at creation and Ankra commits the cluster's stack definitions to Git.

## Creating a DOKS cluster

<Tabs>
  <Tab title="Portal">
    <Steps>
      <Step title="Create Cluster">
        Go to **Clusters** → **Create Cluster** and pick DigitalOcean's **Cloud Managed** action.
      </Step>

      <Step title="Credential & Region">
        Select the DigitalOcean credential and a region (for example `fra1`). Regions load live from DigitalOcean.
      </Step>

      <Step title="Node Pools">
        Define one or more worker pools: name, droplet size (with live pricing), count, labels, and autoscaling bounds.
      </Step>

      <Step title="Kubernetes">
        Pick a Kubernetes version or keep the default, and optionally enable the **HA control plane**.
      </Step>

      <Step title="GitOps (optional) & Create">
        Optionally connect a Git repository, then create. Ankra runs DigitalOcean preflight checks, provisions the cluster, retrieves the kubeconfig, and installs the Ankra Agent.
      </Step>
    </Steps>
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    ankra cluster managed create \
      --provider doks \
      --name my-doks-cluster \
      --credential-id <do-credential-id> \
      --location fra1 \
      --node-pool-name workers \
      --node-pool-size s-2vcpu-4gb \
      --node-pool-count 2
    ```

    The HA control plane and node-pool autoscaling bounds are set from the portal or the API.
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X POST https://platform.ankra.app/org/clusters/managed/doks \
      -H "Authorization: Bearer $ANKRA_API_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "my-doks-cluster",
        "credential_id": "<do-credential-id>",
        "location": "fra1",
        "kubernetes_version": "1.33.1-do.0",
        "node_pools": [
          {"name": "workers", "size": "s-2vcpu-4gb", "count": 2}
        ],
        "ha": true
      }'
    ```
  </Tab>
</Tabs>

### DOKS options

| Field | Description                                      |
| ----- | ------------------------------------------------ |
| `ha`  | Highly available control plane (top-level field) |

## Day-2 operations

Node pools, upgrades, and deletion work from the CLI, portal, or API. The CLI examples use `--provider doks`:

```bash theme={null}
# scale a pool to a fixed count
ankra cluster managed node-pool scale <cluster_id> workers --provider doks --count 5

# upgrade the cluster
ankra cluster managed upgrade <cluster_id> --provider doks --version 1.33.1-do.0

# delete the cluster
ankra cluster managed delete <cluster_id> --provider doks
```

Autoscaling bounds are set from the portal or the `PATCH .../node-pools/{name}` endpoint. See [Managed Kubernetes - day-2 operations](/guides/managed-kubernetes#day-2-operations) for the shared node-pool and upgrade mechanics.

## Importing an existing DOKS cluster

Already running DOKS? Discover clusters at DigitalOcean and adopt them into Ankra without touching them. Discovery and import run from the portal or API - see [Managed Kubernetes - importing existing clusters](/guides/managed-kubernetes#importing-existing-clusters).

## Related

* [Managed Kubernetes overview](/guides/managed-kubernetes)
* [DigitalOcean API Credentials](/platform/credentials/digitalocean)
* [Cluster settings](/platform/cluster-settings)
