Introduction
By default, a Crusoe Managed Kubernetes (CMK) cluster is configured with a pod CIDR range of /16 and a node CIDR mask of /24. This setup allows for a total of 65,536 pod IP addresses. Since each node is allocated a /24 subnet (providing 256 IPs), the cluster can support a maximum of 256 nodes (65,536/256). This guide explains how users can create a CMK cluster that supports more than 256 nodes.
Prerequisites
Before starting, ensure you have the following:
- Access to a Crusoe Cloud project with appropriate permissions
- A CMK cluster with the latest image version (>= 1.30.8-cmk.26)
- Kubeconfig to access your CMK cluster
- Access to Crusoe CLI or Console
Step-by-Step Instructions
To create a CMK cluster that supports more than 256 nodes, you need to specify a larger pod CIDR range and/or a smaller node CIDR mask during the cluster creation process.
Using Crusoe CLI
When creating a cluster using the Crusoe CLI, use the --cluster-cidr
and --node-cidr-mask-size
flags to define the desired network configuration.
Example:
To create a cluster named large-cluster
with cluster version 1.30.8-cmk.26
in the eu-iceland1
location, with a pod CIDR range of 10.0.0.0/8
and a node CIDR mask size of /24
, use the following command:
crusoe kubernetes clusters create --name large-cluster --cluster-version 1.30.8-cmk.26 --location eu-iceland1-a --cluster-cidr "10.0.0.0/8" --node-cidr-mask-size 24
Using Crusoe Cloud Console (UI)
When creating a cluster via the Crusoe Cloud Console, you will find options to configure the "Pod CIDR" and "Node Mask Size" during the cluster configuration steps. Modify these values according to your requirements.
Understanding CIDR Ranges and Node Capacity
The following table provides a reference for adjusting the Pod CIDR range and per-node CIDR mask to support your desired number of nodes and pods per node:
Pod CIDR Range | Node Mask | Max Nodes | Pods per Node |
---|---|---|---|
10.234.0.0/16 |
/24 |
256 | 256 |
10.234.0.0/16 |
/25 |
512 | 128 |
10.234.0.0/16 |
/26 |
1024 | 64 |
10.0.0.0/15 |
/24 |
512 | 256 |
10.0.0.0/15 |
/25 |
1024 | 128 |
10.0.0.0/14 |
/24 |
1024 | 256 |
10.0.0.0/14 |
/23 |
512 | 512 |
10.0.0.0/12 |
/24 |
4096 | 256 |
10.0.0.0/12 |
/26 |
16,384 |
64 |
General Formula:
The number of nodes a cluster can support is determined by the total number of usable IP addresses available for pods divided by the number of usable IP addresses allocated to each node.
Where:
-
Total Usable IPs for Pods is determined by the
--cluster-cidr
. A smaller CIDR suffix (e.g., /14) provides a larger range of IP addresses. -
Usable IPs per Node is determined by the
--node-cidr-mask-size
. A larger CIDR suffix (e.g., /24) provides fewer IP addresses per node, while a smaller suffix (e.g., /26) provides more.
Comments
0 comments
Article is closed for comments.