Extending the services IP range

Increase the service IP range to better accommodate your cluster needs.

By default the service IP range is 10.0.0.1/24. This range contains 255 IPs, which means you can create 255 service resources only.IBM Cloud Private uses a few of these IPs for the management services. If the available number of IPs cannot meet the requirements of your cluster, you can extend the service IP range.

Complete the following steps on each master node in your cluster.

  1. Backup the master.json file.

     cp /etc/cfc/pods/master.json <back_up_location>
    
  2. From the back up location, edit the master.json file. Update the kube-apiserver IP range to suit the needs of your cluster. For high availability environments, you must update the master.json file on each master node one by one. This ensures that Kubernetes services are not interrupted during the update process.

    For example to extend the number of IPs to 65535, make the following update:

    Change "--service-cluster-ip-range=10.0.0.1/24" to "--service-cluster-ip-range=10.0.0.1/16"

  3. Copy over the modified file to update the static pod manifest file.

     cp /<back_up_location>/master.json /etc/cfc/pods/
    

    When the manifest file updates, Kubelet restarts all the static pods. These include kube-apiserver, kube-controller-manager, and kube-scheduler.

  4. Ensure that the three Kubernetes core services are started successfully.

     docker ps | grep hyper