Change:
) func TestEstablishMasterConnection(t *testing.T) { <ins> srv := stubServer(t) defer srv.Close() tests := []struct { c      string e      string expect bool }{ { c:      "", e:      "", expect: false, }, { c:      "", e:      srv.URL, expect: true, }, { c:      "foo", e:      srv.URL, expect: true, }, } for _, rt := range tests { s := &kubeadmapi.TokenDiscovery{} c := &kubeadmapi.ClusterInfo{Endpoints: []string{rt.e}, CertificateAuthorities: []string{rt.c}} _, actual := EstablishMasterConnection(s, c) if (actual == nil) != rt.expect { t.Errorf( "failed EstablishMasterConnection:ntexpected: %tnt  actual: %t", rt.expect, (actual == nil), ) } } } func TestEstablishMasterConnectionWithMultipleEndpoints(t *testing.T) { // ref. https://github.com/kubernetes/kubernetes/issues/36988 srv := stubServer(t) defer srv.Close() s := &kubeadmapi.TokenDiscovery{} c := &kubeadmapi.ClusterInfo{Endpoints: []string{srv.URL, srv.URL}, CertificateAuthorities: []string{"foo"}} defer func() { if r := recover(); r != nil { t.Errorf("failed EstablishMasterConnectionWithMultipleEndpoints; got a panic.") } }() EstablishMasterConnection(s, c) } func stubServer(t *testing.T) *httptest.Server { </ins> expect := version.Info{ Major:     "foo", Minor:     "bar",

Discussion:
<!-- Thanks for filing an issue! Before hitting the button, please answer these questions.--Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see ): No. What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): kubeadm join kubeadm join crash kubeadm close of closed channel Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT <!-- If this is a BUG REPORT, please: Fill in as much of the template below as you can. If you leave out information, we can't help you as well. If this is a FEATURE REQUEST, please: Describe in detail the feature/behavior/change you'd like to see. In both cases, be ready for followup questions, and please respond in a timely manner. If we can't reproduce a bug or think a feature already exists, we might close your issue. If we're wrong, PLEASE feel free to reopen it and explain why. --Kubernetes version (use ): Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.4", GitCommit:"", GitTreeState:"clean", BuildDate:"2016-10-21T02:48:38Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"} kubeadm version (use ): kubeadm version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-alpha.2.380+", GitCommit:"", GitTreeState:"clean", BuildDate:"2016-11-02T14:58:17Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"linux/amd64"} Environment: Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): CentOS Kernel (e.g.

): 3.10.0-327.36.1.el7.x8664 SMP Sun Sep 18 13:04:29 UTC 2016 x8664 x8664 x8664 GNU/Linux Install tools: yum Others: What happened: kubeadm crash when join mulitple API endpoints What you expected to happen: How to reproduce it (as minimally and precisely as possible): join mulitple API endpoints Anything else do we need to know: kubeadm output:
It is already fixed by
seems not fixed, still having this issue with master code
I'm also running into this with a clean build from master kubeadm version kubeadm output kubectl version Environment kernel versionOS version
seems not fixed. I met the same issue . kubeadm version: kernel version: os version: kubectl version: error output by "kubeadm join --token=. 10.47.217.91":
I can also repro this issue - I will work on contributing a fix.
I can also reproduce this issue, following the guide with packaged versions of all the components