How to change Kubernetes CLUSTER_IP_RANGE

1/10/2018

I'm running Kubernetes 1.6.0 and my CLUSTER_IP_RANGE was set to the default of 10.244.0.0/14.

GCE recently decided to reserve 10.128.0.0/9 for auto-mode networks so I think I have to change my CLUSTER_IP_RANGE to something else e.g. 10.64.0.0/11.

I'm a bit nervous about this and am unsure of what the process is to do something like this without downtime.

This is my plan and I was hoping someone could help me confirm whether this is "the right way" or whether it will even work.

  1. Edit the kube-env on my kubernetes master changing the CLUSTER_IP_RANGE
  2. Restart the kubernetes master
  3. Copy the kubernetes minion instance template, but with the CLUSTER_IP_RANGE changed
  4. Create a new kubernetes minion instance group using the new instance template
  5. Scale the new instance group up to N nodes and make sure everything works and the pod ips are within the 10.64.0.0/11 range.
  6. Drain the old kubernetes minions.
  7. Scale the old instance group down to 0 nodes.
-- Jesse Shieh
google-compute-engine
kubernetes

0 Answers