Change:
Is this a BUG REPORT or FEATURE REQUEST?: /kind feature What happened: There is currently no easy way to know what Kubernetes is using as the default CIDR for service cluster IPs. What you expected to happen: should be able to tell users that "10.0.0.0/24" is used as the default. They'd better check if their deployment environment has a conflict with this assumption. They need to customize this parameter to avoid such overlaps if any. How to reproduce it (as minimally and precisely as possible): Run , from the help, the default value for --service-cluster-ip-range is not mentioned. Anything else we need to know?: No. Environment: Kubernetes version (use ): Any Cloud provider or hardware configuration**: Any OS (e.g. from /etc/os-release): Any Kernel (e.g. ): Any Install tools: N/A Others: N/A
/sig api-machinery
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. Prevent issues from auto-closing with an comment. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten /remove-lifecycle stale

Discussion:
}, ServiceNodePortRange: kubeoptions.DefaultServiceNodePortRange, } <ins> s.ServiceClusterIPRange = kubeoptions.DefaultServiceIPCIDR </ins> // Overwrite the default for storage data format. s.Etcd.DefaultStorageMediaType = "application/vnd.kubernetes.protobuf"

// This is a snapshot of expected options parsed by args. expected := &ServerRunOptions{ ServiceNodePortRange:   kubeoptions.DefaultServiceNodePortRange, <ins> ServiceClusterIPRange:  kubeoptions.DefaultServiceIPCIDR, </ins> MasterCount:            5, EndpointReconcilerType: string(reconcilers.MasterCountReconcilerType), AllowPrivileged:        false,

package options import ( <ins> "net" </ins> utilnet "k8s.io/apimachinery/pkg/util/net" ) // DefaultServiceNodePortRange is the default port range for NodePort services. var DefaultServiceNodePortRange = utilnet.PortRange{Base: 30000, Size: 2768} <ins> // DefaultServiceIPCIDR is a CIDR notation of IP range from which to allocate service cluster IPs var DefaultServiceIPCIDR net.IPNet = net.IPNet{IP: net.ParseIP("10.0.0.0"), Mask: net.CIDRMask(24, 32)} </ins>

"net" "github.com/golang/glog" <ins> kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options" </ins> "k8s.io/kubernetes/pkg/registry/core/service/ipallocator" )

func DefaultServiceIPRange(passedServiceClusterIPRange net.IPNet) (net.IPNet, net.IP, error) { serviceClusterIPRange := passedServiceClusterIPRange if passedServiceClusterIPRange.IP == nil { <del> defaultNet := "10.0.0.0/24" glog.Infof("Network range for service cluster IPs is unspecified. Defaulting to %v.", defaultNet) _, defaultServiceClusterIPRange, err := net.ParseCIDR(defaultNet) if err != nil { return net.IPNet{}, net.IP{}, err } serviceClusterIPRange = *defaultServiceClusterIPRange </del> <ins> glog.Infof("Network range for service cluster IPs is unspecified. Defaulting to %v.", kubeoptions.DefaultServiceIPCIDR) serviceClusterIPRange = kubeoptions.DefaultServiceIPCIDR </ins> } if size := ipallocator.RangeSize(&serviceClusterIPRange); size < 8 { return net.IPNet{}, net.IP{}, fmt.Errorf("The service cluster IP range must be at least %d IP addresses", 8)