Skip to content

Commit

Permalink
Merge pull request #1788 from aojea/svcSubnet
Browse files Browse the repository at this point in the history
use /16 service subnet by default
  • Loading branch information
k8s-ci-robot authored Aug 18, 2020
2 parents 1ebcd6f + 9c84809 commit 207da24
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/apis/config/v1alpha4/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ func SetDefaultsCluster(obj *Cluster) {
obj.Networking.PodSubnet = "fd00:10:244::/64"
}
}
// default the service CIDR using the kubeadm default
// default the service CIDR using a different subnet than kubeadm default
// https://github.com/kubernetes/kubernetes/blob/746404f82a28e55e0b76ffa7e40306fb88eb3317/cmd/kubeadm/app/apis/kubeadm/v1beta2/defaults.go#L32
// Note: kubeadm is doing it already but this simplifies kind's logic
// Note: kubeadm is using a /12 subnet, that may allocate a 2^20 bitmap in etcd
// we allocate a /16 subnet that allows 65535 services (current Kubernetes tested limit is O(10k) services)
if obj.Networking.ServiceSubnet == "" {
obj.Networking.ServiceSubnet = "10.96.0.0/12"
obj.Networking.ServiceSubnet = "10.96.0.0/16"
if obj.Networking.IPFamily == "ipv6" {
obj.Networking.ServiceSubnet = "fd00:10:96::/112"
}
Expand Down

0 comments on commit 207da24

Please sign in to comment.