vagrant@worker-1:~$ kubectl get nodes --kubeconfig admin.kubeconfig
error: stat admin.kubeconfig: no such file or directory
vagrant@worker-1:~$
vagrant@worker-1:~$ kubectl get nodes --kubeconfig admin.kubeconfig
error: stat admin.kubeconfig: no such file or directory
vagrant@worker-1:~$
You have to give an absolute path of admin.kubeconfig file like /root/certs/admin.config
. Where it is stored. If you want to run this command like this then you have to put that file in current path.
It was a mistake, I am checking in worker instead of master, thanks