diff --git a/docs/setup/independent/create-cluster-kubeadm.md b/docs/setup/independent/create-cluster-kubeadm.md index b9f923ef1d..cc89d31054 100644 --- a/docs/setup/independent/create-cluster-kubeadm.md +++ b/docs/setup/independent/create-cluster-kubeadm.md @@ -178,6 +178,16 @@ as root: kubeadm join --token : --discovery-token-ca-cert-hash sha256: ``` +To make kubectl work for your non-root user, you might want to run these commands (which is also a part of the `kubeadm init` output): +``` + mkdir -p $HOME/.kube + sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config + sudo chown $(id -u):$(id -g) $HOME/.kube/config +``` +Alternatively, if you are the root user, you could run this: +``` +export KUBECONFIG=/etc/kubernetes/admin.conf +``` Make a record of the `kubeadm join` command that `kubeadm init` outputs. You will need this in a moment.