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

# IP address sizing

> How many IP addresses e6data uses in your AWS subnets, per cluster size, and how to fit a deployment into a small range.

ReferenceApplies to: CloudPrem on AWS

Every node and every pod takes an address from your subnets, so subnet size matters. Plan /22 or larger per subnet with default settings, or fit everything in one /24 with tuned pod networking.

Cluster sizes differ only in executor count: XS 1, S 2, M 4, L 8, XL 16, XXL 32. Below, **N** is the executor count.

## Requirements

* Default VPC CNI: 2 private subnets, /22 or larger each. /23 each fits one workspace and one S cluster only when you install into an existing cluster (494 addresses needed per zone); a new cluster needs /22. A /24 per subnet is too small with default settings (calculated).
* Tuned VPC CNI: one /24 in total (two /25 subnets) is enough for a workspace and an XS cluster.
* Custom networking: nodes take one address each from your range; pods use a secondary `100.64.0.0/16` range.
* Kubernetes service range /24 or larger.
* AWS reserves 5 addresses in every subnet.

## Why updates need spare addresses

During a release update, e6data starts a full copy of a query cluster before it removes the old one. Peak address use is close to double the running cluster. Size for the peak, not the steady state.

## Measured results

| Setup | Range | Addresses used | Result |
| - | - | - | - |
| Default VPC CNI | /24 per subnet | More than a /24 holds (calculated) | Too small with default settings |
| Tuned VPC CNI (`WARM_IP_TARGET=2`, `MINIMUM_IP_TARGET=4`) | One /24 (two /25) | 45 of 246 usable at peak, workspace plus XS cluster | Works end to end |
| Custom networking (pods in `100.64.0.0/16`) | One /24 for nodes | 4 routable addresses with the workspace up; 6 with an XS cluster running a query | Works end to end |
| Custom networking with IPAM-allocated subnets | Two /25 | 2 of 123 usable per /25 | Works end to end |

Measured per node with default settings: 18 to 60 addresses per node. By default the VPC CNI keeps a spare network interface's worth of addresses on every node, often 15 or more. That reserve, not e6data, usually fills small subnets.

## What uses addresses

| Component | Default VPC CNI | Tuned VPC CNI |
| - | - | - |
| Workspace (console, metadata services, query router) and system add-ons | About 122 per workspace (estimate) | About 30 |
| Each running cluster node | 18 to 60 (measured range) | About 4 (node, spare addresses and its pods) |
| Cluster nodes per size | N + 2 (two planner/queue nodes plus one per executor) | Same |
| Extra EKS cluster (system nodes) | About 38 | Not measured |
| Each VPC interface endpoint | 1 per AZ | 1 per AZ |
| Network load balancer for the workspace | 1 per AZ | 1 per AZ |

Default VPC CNI: an XS deployment needs about 400 addresses on a new cluster, or about 374 in an existing cluster (default machines; calculated from measured per-node figures). A /24 has 251 usable, so it fits no cluster.

Tuned VPC CNI, estimate including the update copy (about 36 + 10 × (2 + N)):

| Size | XS | S | M | L | XL | XXL |
| - | - | - | - | - | - | - |
| Addresses (estimate) | 66 | 76 | 96 | 136 | 216 | 376 |
| Fits one /24 (246 usable)? | Yes (measured) | Yes | Yes | Yes | Yes | No |

> [!NOTE]
>
> Only XS is measured. Address counts for larger sizes are estimates.

## Service range

| Services | AWS (measured) |
| - | - |
| Cluster-wide | 11 |
| Per workspace | 6 |
| Per cluster | 2 |
| Extra during an update | 2 |
| One workspace and one cluster | 21 |

A /24 (254 Services) is the minimum. Larger ranges are fine.

## Steps

### Fit e6data in one /24

1. Create one subnet per AZ from your range (for example two /25s from a /24). Give them routes to your VPC endpoints and your egress path.

2. Set the `vpc-cni` add-on configuration:

   ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
   {"env": {"WARM_IP_TARGET": "2", "MINIMUM_IP_TARGET": "4"}}
   ```

3. Apply it. Add `--service-account-role-arn` only if your `vpc-cni` add-on has its own IAM role (IRSA); e6data's install runs it on the node role:

   ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
   aws eks update-addon --cluster-name <CLUSTER> --addon-name vpc-cni \
     --configuration-values file://vpc-cni.json
   ```

4. With fixed node groups and Cluster Autoscaler, set the engine node group maximum to the nodes your largest cluster needs, plus 1. Workspace services take one engine node; a maximum of 3 was too small for the first resume of an XS cluster. With Karpenter, set the NodePool CPU limit instead.

5. Place VPC endpoints, load balancers and proxies outside the /24 if you like. They can sit in shared subnets.

### Keep pods off your routable range (custom networking)

1. Associate `100.64.0.0/16` with the VPC. Create one pod subnet per AZ (for example two /19s) with the same route table as the node subnets.

2. Set the `vpc-cni` add-on configuration (pass `--service-account-role-arn` only if the add-on has its own IAM role):

   ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
   {"env": {"AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG": "true",
            "ENI_CONFIG_LABEL_DEF": "topology.kubernetes.io/zone",
            "ENABLE_PREFIX_DELEGATION": "true", "WARM_PREFIX_TARGET": "1"}}
   ```

3. Create one `ENIConfig` per AZ, named after the zone, with the pod subnet and the cluster security group.

4. Create node groups after steps 2 and 3. Existing nodes must be replaced to pick it up.

5. Allow `100.64.0.0/16` in VPC endpoint security groups and in any NetworkPolicy `ipBlock`.

Traffic from pods to anything outside the VPC leaves with the node's address. Your firewalls see only your /24.

## Cost impact

* Tuned VPC CNI and custom networking add no AWS cost.
* Smaller subnets don't change the bill. Running out of addresses blocks updates and resumes.

## Preflight check

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
aws ec2 describe-subnets --subnet-ids <SUBNET_A> <SUBNET_B> \
  --query 'Subnets[].[SubnetId,CidrBlock,AvailableIpAddressCount]' --output table
aws eks describe-addon --cluster-name <CLUSTER> --addon-name vpc-cni --query addon.configurationValues
```

Compare free addresses with the per-size tables above, including the update copy. If they're short, use larger subnets, the tuned VPC CNI, or custom networking.

## Verify

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
kubectl get pods -A -o wide        # every pod address is in your range (or 100.64.0.0/16 with custom networking)
```

Resume your largest cluster, run a query, and check the free-address count again. Repeat during a release update.

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| Pods `Pending` during an update, subnets at 0 free | Default VPC CNI reserves on a /24 per subnet | Tuned VPC CNI, custom networking, or larger subnets |
| New nodes `NotReady` after a `vpc-cni` change | Add-on lost its own IAM role (only if it uses IRSA) | Re-run the update with `--service-account-role-arn` |
| Custom networking not used by pods | Nodes were created before the `ENIConfig` | Replace the nodes |
| VPC endpoint calls time out from pods (custom networking) | Endpoint security group lacks `100.64.0.0/16` | Add the range on 443 |

## Limitations

* Address counts above XS are estimates.
* e6data deployments run on IPv4 EKS clusters. IPv6-only subnets and IPv6 EKS clusters are not covered by these figures.

## See also

* [Network requirements](https://docs.e6data.com/platform/deploy/aws-cloudprem/network-requirements.md)
* [Change network settings](https://docs.e6data.com/platform/deploy/aws-cloudprem/change-network-settings.md)
* [Sizing and cost](https://docs.e6data.com/platform/deploy/aws-cloudprem/sizing-and-cost.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.