> For the complete documentation index, see [llms.txt](https://platform9.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://platform9.com/kb/pmk/how-to/increase-existing-kubernetes-cluster-node-count-flannel.md).

# Increase Existing Kubernetes Cluster Node Count for Flannel CNI

## Problem

During cluster creation, the container CIDR value for a cluster having Flannel CNI was set to 10.20.0.0/16. This will allow for a maximum of 256 nodes considering the CNI interfaces have a /24 CIDR.

Can the Container CIDR be modified for an existing cluster to say, for example /14 to allow the addition of worker nodes beyond the current limit?

## Environment

* Platform9 Managed Kubernetes - All Versions
* Flannel

## Procedure

{% hint style="warning" %}
**IMPORTANT**

Customers will need to ensure all running pods/workloads within the cluster are terminated prior to this operation.
{% endhint %}

1. Contact Platform9 Support so that they make the changes in the Backend Qbert DB to update the containerCIDR to a new subnet for the cluster.
2. Once the change is done, delete *cni0* and *flannel0* interfaces on all the nodes part of the cluster.

{% tabs %}
{% tab title="None" %}

```none
~$ sudo ip link del cni0
~$ sudo ip link del flannel0
```

{% endtab %}
{% endtabs %}

2. Restart the PMK stack in a rolling fashion on the Master Nodes which will tear down everything including any running pods and starts over again.

{% tabs %}
{% tab title="None" %}

```none
~$ systemctl stop pf9-hostagent pf9-nodeletd
~$ /opt/pf9/nodelet/nodeletd phases stop
~$ systemctl start pf9-hostagent
```

{% endtab %}
{% endtabs %}

4. Perform the same PMK Stack restart operation in batches or all together for the Worker nodes.
5. Post that, ensure that the *cni0* and *flannel0* interfaces comes up with the changed CIDR values.
6. Test the pod deployment and the Pod to Pod connectivity amongst the master and worker nodes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://platform9.com/kb/pmk/how-to/increase-existing-kubernetes-cluster-node-count-flannel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
