{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24951","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24951/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24951/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24951/events","html_url":"https://github.com/kubernetes/kubernetes/issues/24951","id":151768282,"number":24951,"title":"Go client uses localhost instead of 127.0.0.1","user":{"login":"caseydavenport","id":1944093,"avatar_url":"https://avatars.githubusercontent.com/u/1944093?v=3","gravatar_id":"","url":"https://api.github.com/users/caseydavenport","html_url":"https://github.com/caseydavenport","followers_url":"https://api.github.com/users/caseydavenport/followers","following_url":"https://api.github.com/users/caseydavenport/following{/other_user}","gists_url":"https://api.github.com/users/caseydavenport/gists{/gist_id}","starred_url":"https://api.github.com/users/caseydavenport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseydavenport/subscriptions","organizations_url":"https://api.github.com/users/caseydavenport/orgs","repos_url":"https://api.github.com/users/caseydavenport/repos","events_url":"https://api.github.com/users/caseydavenport/events{/privacy}","received_events_url":"https://api.github.com/users/caseydavenport/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/CSI-API%20Machinery%20SIG","name":"team/CSI-API Machinery SIG","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-28T23:51:48Z","updated_at":"2016-04-29T21:13:42Z","closed_at":null,"body":"The Kubernetes Go client uses `localhost` by default to access the apiserver.\r\n\r\nOn CoreOS, where it is common to not have an `/etc/hosts` file, this means apps using the client will often fail to lookup `localhost` and be unable to access the API.\r\n\r\nShouldn't the client be using `127.0.0.1` instead of `localhost` here?\r\n\r\nhttps://github.com/kubernetes/kubernetes/blob/master/pkg/client/unversioned/clientcmd/client_config.go#L39"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/215883438","html_url":"https://github.com/kubernetes/kubernetes/issues/24951#issuecomment-215883438","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24951","id":215883438,"user":{"login":"aaronlevy","id":374924,"avatar_url":"https://avatars.githubusercontent.com/u/374924?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlevy","html_url":"https://github.com/aaronlevy","followers_url":"https://api.github.com/users/aaronlevy/followers","following_url":"https://api.github.com/users/aaronlevy/following{/other_user}","gists_url":"https://api.github.com/users/aaronlevy/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlevy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlevy/subscriptions","organizations_url":"https://api.github.com/users/aaronlevy/orgs","repos_url":"https://api.github.com/users/aaronlevy/repos","events_url":"https://api.github.com/users/aaronlevy/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlevy/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T21:13:42Z","updated_at":"2016-04-29T21:13:42Z","body":"You can do a localhost lookup, but this was brought up due to a container running with `hostNetwork=true` and I believe Docker's `--net=host` behavior is to copy the host `/etc/hosts` into the container fs (which on CoreOS doesn't exist).\r\n\r\nI opened a related issue against CoreOS here: https://github.com/coreos/bugs/issues/1260"}}