https://rancher.com/ logo
Title
h

hundreds-airport-66196

05/09/2022, 9:03 PM
Our rke2 is up and running in prod. Now, it has having conflict with network subnet 10.42.0.0/16 as this subnet is also use by the cluster load. Is there a documentation on how to change the cidr settings? thanks
c

creamy-pencil-82913

05/09/2022, 9:08 PM
You cannot change that on a running cluster. You must redeploy the cluster from scratch to change the pod or service CIDRs.
h

hundreds-airport-66196

05/09/2022, 9:10 PM
Hi Brandon, If I re-deploy, do I need only --cluster-cidr, --service-cidr and --cluster-dns?
c

creamy-pencil-82913

05/09/2022, 9:10 PM
depends on what you want to change.
service-cider is 10.43.0.0/16 by default, do you also need to change that?
and cluster-dns is set automatically based on the service-cidr; you should only set that if you don’t want it to be (service-cidr)+10 for some reason.
h

hundreds-airport-66196

05/09/2022, 9:12 PM
If the load has the possibility of using that, then yes. If I change service-cidr, I also need to change cluster-dns? is that right?
c

creamy-pencil-82913

05/09/2022, 9:12 PM
^^
h

hundreds-airport-66196

05/09/2022, 9:13 PM
ah ok, on cluster-dns
thanks Brandon!
Will etcd backup/restore still work if I redeploy using a new CIDR? (cluster and service)
c

creamy-pencil-82913

05/09/2022, 9:18 PM
no, if you restore from backup you’d have all the nodes and services and such using the same wrong IPs that you have now.
node CIDRs are immutable - they cannot be changed once the node joins the cluster. You basically need to delete all the nodes, pods, and services from the cluster to change the CIDRs.
at that point you might as well just delete the whole cluster and redeploy your workload, its less time consuming than trying to keep Kubernetes from getting angry about you deleting everything
h

hundreds-airport-66196

05/09/2022, 9:22 PM
Its redeploying the workload that Im worried about. thanks