{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/3681","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/3681/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/3681/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/3681/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/3681","id":55050667,"number":3681,"title":"Support Kubernetes to push all kube traffic on any nic","user":{"login":"sub-mod","id":7363264,"avatar_url":"https://avatars.githubusercontent.com/u/7363264?v=3","gravatar_id":"","url":"https://api.github.com/users/sub-mod","html_url":"https://github.com/sub-mod","followers_url":"https://api.github.com/users/sub-mod/followers","following_url":"https://api.github.com/users/sub-mod/following{/other_user}","gists_url":"https://api.github.com/users/sub-mod/gists{/gist_id}","starred_url":"https://api.github.com/users/sub-mod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sub-mod/subscriptions","organizations_url":"https://api.github.com/users/sub-mod/orgs","repos_url":"https://api.github.com/users/sub-mod/repos","events_url":"https://api.github.com/users/sub-mod/events{/privacy}","received_events_url":"https://api.github.com/users/sub-mod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-21T17:33:46Z","updated_at":"2015-01-21T21:22:49Z","closed_at":null,"body":"Currently in master.go line 195 . we have a code similar to below\r\npackage main\r\n\r\nimport (\r\n        \"fmt\"\r\n        \"net\"\r\n)\r\n\r\nfunc main() {\r\n\r\n        addrs, err := net.InterfaceAddrs()\r\n        if err != nil {\r\n                fmt.Println(\"error \")\r\n        }   \r\n\r\n        for i := range addrs {\r\n                ip, _, err := net.ParseCIDR(addrs[i].String())\r\n                if err != nil {\r\n                        continue\r\n                }   \r\n\r\n                if ip.IsLoopback() {\r\n                        fmt.Println(\"Loopback found \", ip.String())\r\n                        continue\r\n                }   \r\n\r\n                fmt.Println(\"IP = \", ip.String())\r\n                break\r\n        }   \r\n}\r\n\r\nAs a result if a machine has multiple nics Assume eth0 and eth1 and i want kube traffic to go via eth1 and not via eth0.The above code would always cause eth0 to be picked up.And this become public IP of kube.\r\nAnd there is no way to specify that eth1 should be only nic to be used.And public IP of kubernetes should be of nic eth1.\r\nIf this is a valid bug I suggest we support changing code in master.go line 195.and maybe adding a new variable in config files to define on which nic kube traffic should be allowed\r\n"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/70924338","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/3681#issuecomment-70924338","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/3681","id":70924338,"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":"2015-01-21T21:22:49Z","updated_at":"2015-01-21T21:22:49Z","body":"The proxier uses chooseHostInterface() just for iptables rules that require\nan IP address.  That's not the default bind address.\n\nI'd be happy to see a global change that we bind to all interfaces unless\nexplicitly told not to, but we need to carefully consider how this might\nbreak people in surprising ways.  Consider that some VMs have an interface\nthat is exposed publicly.\n\nOn Wed, Jan 21, 2015 at 11:06 AM, sub-mod <notifications@github.com> wrote:\n\n> @brendanburns <https://github.com/brendanburns> Can I fix this issue ?\n> 1)unify master.go code and proxier.go code by using the same method\n> chooseHostInterface\n> 2)Add a config paramater to dynamically discover the IP address for that\n> interface if nic is given.\n>\n> --\n> Reply to this email directly or view it on GitHub\n> <https://github.com/GoogleCloudPlatform/kubernetes/issues/3681#issuecomment-70900049>\n> .\n>"}}