DigitalOcean (DOKS)
CostPilot supports DigitalOcean Kubernetes (DOKS) clusters with pricing fetched in real time from the DigitalOcean /v2/sizes API. The full Droplet size catalogue is retrieved and cached for 24 hours, providing accurate per-node pricing for all DOKS node types.
How pricing is fetched
When CostPilot first encounters a DOKS cluster, it queries the DigitalOcean /v2/sizes API to retrieve the current pricing for all available Droplet sizes. This response includes the hourly rate for every size in USD. The results are cached locally for 24 hours before a fresh fetch is triggered.
The 24-hour cache is appropriate for DigitalOcean because DO pricing changes infrequently — typically only when new Droplet sizes are introduced or during periodic price adjustments. The cache significantly reduces the number of API calls made by the ingester without meaningfully affecting pricing accuracy.
If DigitalOcean releases a new Droplet size that appears in your cluster before the 24-hour cache has expired, CostPilot will not have pricing for it until the next cache refresh. In this case, the node will temporarily show zero cost. This resolves automatically when the cache refreshes.
Optional API token
By default, CostPilot fetches Droplet sizes from the DigitalOcean API without authentication, as the /v2/sizes endpoint is publicly accessible. However, if your organisation restricts outbound API calls or you want to ensure access to the full size catalogue including private/beta sizes, you can provide a DigitalOcean API token in the cluster configuration.
To configure the API token, go to Settings → Clusters, select your DOKS cluster, and enter the token in the Cloud credentials panel. The token requires only read-only scope.
The API token is stored encrypted at rest and is used solely for pricing lookups. It is never transmitted to third-party services.
Supported Droplet types
DigitalOcean organises its Droplets into four product lines, all of which are supported by CostPilot:
Basic Droplets
The entry-level tier, suitable for lightweight workloads and development environments. Basic Droplets use shared vCPUs and are the most cost-effective option for non-critical DOKS workloads.
| Size | vCPUs | Memory | Monthly price (approx.) |
|---|---|---|---|
s-1vcpu-2gb | 1 | 2 GB | ~$12 |
s-2vcpu-4gb | 2 | 4 GB | ~$24 |
s-4vcpu-8gb | 4 | 8 GB | ~$48 |
s-8vcpu-16gb | 8 | 16 GB | ~$96 |
General Purpose Droplets
Dedicated vCPUs with a balanced CPU-to-memory ratio. Recommended for production DOKS clusters running mixed workloads.
| Size prefix | Examples |
|---|---|
g- | g-2vcpu-8gb, g-4vcpu-16gb, g-8vcpu-32gb |
gd- (with NVMe SSD) | gd-2vcpu-8gb, gd-4vcpu-16gb |
CPU-Optimised Droplets
High ratio of vCPU to memory, suited for compute-intensive workloads such as data processing, CI runners, and encoding.
| Size prefix | Examples |
|---|---|
c- | c-2, c-4, c-8, c-16, c-32 |
c2- (with NVMe SSD) | c2-2vcpu-4gb, c2-4vcpu-8gb |
Memory-Optimised Droplets
High ratio of memory to vCPU, suited for caching layers, in-memory databases, and memory-intensive applications.
| Size prefix | Examples |
|---|---|
m- | m-2vcpu-16gb, m-4vcpu-32gb, m-8vcpu-64gb |
m3- (with NVMe SSD) | m3-2vcpu-16gb, m3-4vcpu-32gb |
Node identification
CostPilot identifies DOKS nodes by matching the instance type against DigitalOcean’s Droplet size naming conventions. DOKS sets the node.kubernetes.io/instance-type label on each node with the Droplet slug (e.g. g-4vcpu-16gb). CostPilot matches this slug against the cached /v2/sizes response to retrieve the exact hourly price.
CPU and memory cost split
DigitalOcean publishes a single blended hourly price per Droplet size. CostPilot applies the following default split:
| Droplet type | CPU fraction | Memory fraction |
|---|---|---|
| Basic (shared vCPU) | 50% | 50% |
| General Purpose | 50% | 50% |
| CPU-Optimised | 65% | 35% |
| Memory-Optimised | 35% | 65% |
You can override these values in Settings → Clusters → Cost configuration if you have workloads that are strongly biased towards CPU or memory.
Spot and reserved instances
DigitalOcean does not currently offer spot or reserved instances for Droplets. All DOKS nodes run at the standard on-demand hourly rate. There is no spot pricing support for this provider.
Tips for reducing DOKS costs
- Match Droplet type to workload profile. Use CPU-Optimised Droplets for CPU-bound workloads and Memory-Optimised for cache-heavy applications. Running a memory-intensive workload on General Purpose Droplets wastes CPU capacity that you are paying for but not using.
- Review idle cost per node. Basic Droplets with shared vCPUs can exhibit variable performance under load, which sometimes leads teams to over-provision. CostPilot’s idle cost breakdown highlights nodes where pod requests are well below allocated capacity.
- Use node autoscaling. DOKS supports cluster autoscaling. Pair autoscaling with CostPilot’s trend data to tune the minimum and maximum node counts for each node pool.
- Consolidate small node pools. Multiple small node pools of different sizes can lead to fragmentation and idle capacity. CostPilot’s node-level view makes it easy to spot pools where idle cost consistently exceeds 30–40% of total cost.