Feat change of cluster and service cidr #1080
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@mysticaltech
Problem
You cannot change the cluster_ipv4_cidr and service_ipv4_cidr really. I tested this with Cilium and if changed those values to...
The ClusterIP of "kubernetes" service in default namespace was well referencing to 10.64.0.1 but the rest of the services were still running in 10.43.0.0/16 CIDR. To permanent set those values, you need to make sure that these values are fixed set in the config.yaml of k3s. This was well the case for the initial config create in init.tf for the first control plane node, but not the config update later on all control plane nodes. Also what it is missing for that feature to get really this working is setting the cluster-dns value which defines the IPv4 address of the core-dns service, which is always set fixed by k3s. Here a screenshot which gives you an overview of those values for "k3s server" command:
Solution and therefore PR
Proof it works