doctl Verified current stable Not installed? Kubernetes

Doctl / List Machine Sizes For Kubernetes Cluster

List Machine Sizes For Kubernetes Cluster

List available machine sizes for Kubernetes clusters on DigitalOcean.

$
Terminal
doctl k o s

When To Use

Prior to configuring cluster parameters for resource allocation.

Pro Tip

Consider the workload characteristics to select appropriate sizes.

Anatomy of Output

Understanding the result

Available Machine Sizes: Size List

Lists the various machine sizes for use.

- s-2vcpu-4gb Size ID

2 vCPUs, 4GB RAM size option.

- s-4vcpu-8gb Size ID

4 vCPUs, 8GB RAM size option.

- s-8vcpu-16gb Size ID

8 vCPUs, 16GB RAM size option.

Power User Variants

Optimized versions

doctl kubernetes options sizes --verbose

List machine sizes with debugging output.

doctl kubernetes options sizes --format json

Returns sizes formatted in JSON.

Troubleshooting

Common pitfalls

Error: Could not retrieve sizes - API request failed.

Solution: Check API key and permissions.

Error: Network timeout while fetching sizes.

Solution: Wait and retry the command.

Error: Unauthorized access - API key required.

Solution: Ensure you have valid API key with required access.

Command Breakdown

What each part is doing

doctl
Base Command
The executable that performs this operation. Here it runs Doctl before the shell applies any redirect operators.
k
k|kubernetes
The value supplied for k|kubernetes.
o
o|options
The value supplied for o|options.
s
s|sizes
The value supplied for s|sizes.

Alternative Approaches

Comparable commands in other tools

Alternative kubernetes tools for the same job.