Customising IP allocation on an OVHcloud Managed Kubernetes cluster

Knowledge Base

Customising IP allocation on an OVHcloud Managed Kubernetes cluster


Icons/System/eye-open Created with Sketch. 2 Views 17.03.2026 Managed Kubernetes Service (MKS)

Objective

This guide details how to customise the IP ranges used for the pods and services in your OVHcloud Managed Kubernetes cluster with Standard plan.

Requirements

Limits

The customisation of the pods and services IP allocation policy is not possible on clusters with the Free plan.

You cannot modify the IP allocation policy of a running cluster. It must be set at cluster creation or when resetting the cluster, which erases all data.

Configuration details

Two parameters are available to control the IP allocation policy in your OVHcloud Managed Kubernetes cluster.

ParameterDefault valueFunction
podsIpv4Cidr10.240.0.0/13This is the subnet used to address all the pods in the cluster
servicesIpv4Cidr10.3.0.0/16This is the subnet used to address all the services in the cluster

You can find more information about the CIDR notation here: Classless Inter-Domain Routing

Keep the following rules in mind for these parameters:

  • podsIpv4Cidr and servicesIpv4Cidr must not collide with each other, nor with the OpenStack subnets on the same VLAN in your project.
  • The subnets must be chosen in the private network blocks.
  • The minimal size allowed for the podsIpv4Cidr and the servicesIpv4Cidr subnets is /16.

Each node in the cluster is assigned a /24 subnet inside podsIpv4Cidr; choosing a /16 limits the cluster to 256 nodes.

Adding nodes past the limit of possible /24 subnets in the podsIpv4Cidr could render your cluster unstable.

Instructions using the OVHcloud API

You can find more information on how to use the OVHcloud API here: First steps with the OVHcloud API.

Creating a new cluster with a custom IP allocation policy

Using the following call, you can create a new cluster:

To set a custom IP allocation policy on pods and/or services, you can use the following example:

{
  "name": "my-cluster-with-custom-ip",
  "nodepool": {
    "desiredNodes": 3,
    "flavorName": "b3-8",
    "name": "my-nodepool"
  },
  "region": "GRA11",
  "ipAllocationPolicy": {
    "podsIpv4Cidr": "172.16.0.0/12",
    "servicesIpv4Cidr": "10.100.0.0/16"
  }
}

Once the cluster is created, use this call to verify the IP allocation policy:

Resetting a cluster to change its IP allocations

Resetting a cluster will delete all data and workload running on the cluster.

Using the following call, you can reset a cluster and specify a custom IP allocation policy:

To set a custom IP allocation policy on pods and/or services, you can use the following example:

{
  "ipAllocationPolicy": {
    "podsIpv4Cidr": "172.16.0.0/12",
    "servicesIpv4Cidr": "10.100.0.0/16"
  }
}

Once the cluster is reset, use this call to verify the IP allocation policy:

Go further

Known limits of OVHcloud Managed Kubernetes

First steps with the OVHcloud API

If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for assisting you on your specific use case of your project.

Join our community of users.

Related articles