<p>I am trying to access a remote kubernetes cluster with kubectl. In order to copy/paste cluster credentials in the kubeconfig file I tried to access with &quot;<strong>~/.kube/config</strong>&quot; command but there is an error saying &quot;<strong>No such file or directory</strong>&quot;.</p>
<p>Could anyone please tell me why i get this error? kubectl is perfectly working.</p>

coco
<p>In my case I had KUBECONFIG variable set to &quot;~/.kube/config&quot; in .bashrc. The file existed &amp; had correct permissions yet it wasn't being resolved somehow. Turned out I had to use ${HOME} in place of ~. That did the trick.</p>
