Can not find kubeconfig file

I am trying to access a remote kubernetes cluster with kubectl. In order to copy/paste cluster credentials in the kubeconfig file I executed "~/.kube/config" command but there is an error saying "No such file or directory".

Could anyone please tell me why i get this error? kubectl is perfectly working.

1 Answer

~/.kube/config is not a command

You should copy the /etc/kubernetes/admin.conf file from one of your Kubernetes master node, to ~/.kube/config on your host.

scp :/etc/kubernetes/admin.conf ~/.kube/config

Then, you may use kubectl or oc - having installed them as well.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like