<p>I am brand new to kubernetes. I am working on a Mac M1. Docker is already installed</p>
<p>I followed the aws instructions <a href="https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html" rel="nofollow noreferrer">here</a></p>
<p>I got caught with this error:</p>
<blockquote>
<p>The connection to the server localhost:8080 was refused - did you specify the right host or port?</p>
</blockquote>
<p>This led me to instructions all over the internet that I need to copy <code>/etc/kubernetes/admin.conf</code> to <code>~/.kube/config</code></p>
<p>This is where it gets weird. I don't have a <code>etc/kubernetes</code> directory.</p>
<p><strong>Question:</strong> Does anyone know why and how to fix?</p>
<p>In addition, it turnes out that kubectl was already installed with homebrew. I uninstalled and reinstalled following aws instructions (above). This still brought no success</p>
<p>Any help deeply appreciated</p>

Jake
<p><code>/etc/kubernetes</code> directory is present inside the master nodes of the cluster. In case of bare-metal kubernetes , you can <code>SSH</code> into one of the nodes &amp; copy the <code>admin.conf</code> file.</p>
<p>For cloud based k8s cluster like AWS's EKS, download the <code>admin.conf</code> file from the dashboard and place it <code>~/.kube/</code> folder. This <a href="https://hub.qovery.com/guides/tutorial/how-to-connect-to-your-eks-cluster-with-kubectl/" rel="nofollow noreferrer">AWS EKS Kubeconfig access</a> may help you</p>
