Hi, whiile copying kube config file in kubeadm init process, why should we run . . .

kanchana:
hi,
whiile copying kube config file in kubeadm init process, why should we run as a regular user? please someone explain,

Mohamed Ayman:
Are u asking about this?
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf HOME/.kube/config sudo chown (id -u):$(id -g) $HOME/.kube/config

Basavraj Nilkanthe:
@kanchana … Because you should able to run kubectl command from your account without switching to root account…

Basavraj Nilkanthe:
This is not compulsory

Basavraj Nilkanthe:
You can run this command for any other account

Basavraj Nilkanthe:
You can run for root also if you want to run kubectl command for root account

Basavraj Nilkanthe:
This is simple

Basavraj Nilkanthe:
This is default location where kubectl read cluster, user and namespace information and identify current context…