From 2be66feb4943acafc755350077168f18cec8b08f Mon Sep 17 00:00:00 2001 From: Hu Shuai Date: Mon, 31 Aug 2020 15:27:20 +0800 Subject: [PATCH] Improve the prompt message when kubeadm init is successful Signed-off-by: Hu Shuai --- cmd/kubeadm/app/cmd/init.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/kubeadm/app/cmd/init.go b/cmd/kubeadm/app/cmd/init.go index 76f2299e0d4..591f662e2cc 100644 --- a/cmd/kubeadm/app/cmd/init.go +++ b/cmd/kubeadm/app/cmd/init.go @@ -56,6 +56,10 @@ var ( sudo cp -i {{.KubeConfigPath}} $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config + Alternatively, if you are the root user, you can run: + + export KUBECONFIG=/etc/kubernetes/admin.conf + You should now deploy a pod network to the cluster. Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at: https://kubernetes.io/docs/concepts/cluster-administration/addons/