Merge pull request #41734 from xilabao/prompt-user-to-use-admin-kubeconfig

Automatic merge from submit-queue

Prompt user to use secure config in kubeadm

If don't set the kubeconfig, the default action is to use insecure port to connect to apiserver.  It's necessary to tell people to use the admin.kubeconfig 

```
#kubectl cluster-info
Kubernetes master is running at http://localhost:8080
KubeDNS is running at http://localhost:8080/api/v1/proxy/namespaces/kube-system/services/kube-dns

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
```
pull/6/head
Kubernetes Submit Queue 2017-02-21 08:48:13 -08:00 committed by GitHub
commit 443192c349
1 changed files with 4 additions and 1 deletions

View File

@ -48,6 +48,9 @@ var (
initDoneMsgf = dedent.Dedent(`
Your Kubernetes master has initialized successfully!
To start using your cluster, you need to run:
export KUBECONFIG=%s
You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
http://kubernetes.io/docs/admin/addons/
@ -267,7 +270,7 @@ func (i *Init) Run(out io.Writer) error {
return err
}
fmt.Fprintf(out, initDoneMsgf, generateJoinArgs(i.cfg))
fmt.Fprintf(out, initDoneMsgf, path.Join(kubeadmapi.GlobalEnvParams.KubernetesDir, kubeadmconstants.AdminKubeConfigFileName), generateJoinArgs(i.cfg))
return nil
}