{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25394","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25394/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25394/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25394/events","html_url":"https://github.com/kubernetes/kubernetes/issues/25394","id":153920842,"number":25394,"title":"service cluster ip range problem","user":{"login":"AdoHe","id":1555564,"avatar_url":"https://avatars.githubusercontent.com/u/1555564?v=3","gravatar_id":"","url":"https://api.github.com/users/AdoHe","html_url":"https://github.com/AdoHe","followers_url":"https://api.github.com/users/AdoHe/followers","following_url":"https://api.github.com/users/AdoHe/following{/other_user}","gists_url":"https://api.github.com/users/AdoHe/gists{/gist_id}","starred_url":"https://api.github.com/users/AdoHe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdoHe/subscriptions","organizations_url":"https://api.github.com/users/AdoHe/orgs","repos_url":"https://api.github.com/users/AdoHe/repos","events_url":"https://api.github.com/users/AdoHe/events{/privacy}","received_events_url":"https://api.github.com/users/AdoHe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-10T04:17:31Z","updated_at":"2016-05-10T05:54:38Z","closed_at":null,"body":"FYI. I have a big subnet: `10.196.192.0/19`, for some reason I can't configure this as service cluster ip range directly, I have to reserve the beginning part of this big ip range. So I decide to use ip range which begins at `10.196.216.0` as the cluster ip range. I configured `10.196.216.0/19` as the `--service-cluster-ip-range`, and then I tried to create some services, and just found the service can still get cluster ip which is not behind `10.196.216.0`. Also from code level, this should be desired. It seems I have to configure `--service-cluster-ip-range` as `10.196.216.0/21`, which can satisfy my requirement. This seems ok, as in kubernetes, the cluster ip of service is not in `CIDR` notation(but why not in `CIDR` notation?), but I still think this is not a good way to work around my problem, as `10.196.216.0/21` and `10.196.216.0/19` has different meaning. @bgrant0607 @thockin @nikhiljindal ptal."},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/218065651","html_url":"https://github.com/kubernetes/kubernetes/issues/25394#issuecomment-218065651","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/25394","id":218065651,"user":{"login":"thockin","id":5595220,"avatar_url":"https://avatars.githubusercontent.com/u/5595220?v=3","gravatar_id":"","url":"https://api.github.com/users/thockin","html_url":"https://github.com/thockin","followers_url":"https://api.github.com/users/thockin/followers","following_url":"https://api.github.com/users/thockin/following{/other_user}","gists_url":"https://api.github.com/users/thockin/gists{/gist_id}","starred_url":"https://api.github.com/users/thockin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thockin/subscriptions","organizations_url":"https://api.github.com/users/thockin/orgs","repos_url":"https://api.github.com/users/thockin/repos","events_url":"https://api.github.com/users/thockin/events{/privacy}","received_events_url":"https://api.github.com/users/thockin/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T05:54:38Z","updated_at":"2016-05-10T05:54:38Z","body":"On Mon, May 9, 2016 at 9:18 PM, TonyAdo <notifications@github.com> wrote:\n>\n> FYI. I have a big subnet: 10.196.192.0/19, for some reason I can't configure this as service cluster ip range directly,\n\nWhy not?  What did you try and what error did you get?\n\n> I have to reserve the beginning part of this big ip range.\n\nWhy? What error did you get?\n\n> So I decide to use ip range which begins at 10.196.216.0 as the cluster ip range.\n\n216 is not a sum of powers-of-two.  216 = 0xd8 = 0b1101_1000.\nNetmasks must be a left-aligned contiguous block of binary ones.  In\nthis case the range you have selected is 10.196.192.0/19, 10.196.216.0\njust happens to be inside that range.\n\nhttps://play.golang.org/p/z3yYGRs-68\n\nPerhaps controller-manager should log the CIDR that was actually\ncalculated or even blow up if the ipnet.String() != the input\n(round-trip-clean).  Patches welcome.\n\n> I configured 10.196.216.0/19 as the --service-cluster-ip-range, and then I tried to create some services, and just\n> found the service can still get cluster ip which is not behind 10.196.216.0.\n\nAs above\n\n> Also from code level, this should be desired.\n\nI am not sure I get your meaning?\n\n> It seems I have to configure --service-cluster-ip-range as 10.196.216.0/21, which can satisfy my requirement.\n\n21 bits covers 10.196.216.0, so if you REALLY want that as your\nprefix, you have to use a /21\n\n> This seems ok, as in kubernetes, the cluster ip of service is not in CIDR notation(but why not in CIDR notation?),\n\nA single cluster IP is a /32, but since it is an endpoint, not a\nrange, we would never write it in CIDR notation\n"}}