Hey guys is there a way I can rebuild the file /etc/kubernetes/admin.conf file?

Strider:
Hey guys is there a way I can rebuild the file /etc/kubernetes/admin.conf file?

Mohamed Ayman:
You can copy the kubeconfig file:
cp ~/.kube/config /etc/kubernetes/admin.conf

Strider:
thanks @Mohamed Ayman I was aware of that option but found another command “Kubectl config view --raw” ofcourse for this command to be successful you still need access to the cluster