<p>I have setup a basic 2 node k8s cluster on AWS using KOPS .. I had issues connecting and interacting with the cluster using <code>kubectl</code> ... and I keep getting the error: 
        <code>The connection to the server api.euwest2.dev.avi.k8s.com was refused - did you specify the right host or port?</code> when trying to run any kubectl command .....</p>

<p>have done basic <code>kops export kubecfg --name xyz.hhh.kjh.k8s.com --config=~$KUBECONFIG</code> --> to export the kubeconfig for the cluster I have created. Not sure what else I'm missing to make a successful connection to the kubeapi-server to make kubectl work ?</p>

Avi
<p>Sounds like either:</p>

<ul>
<li>Your kube-apiserver is not running.

<ul>
<li>Check with <code>docker ps -a | grep apiserver</code> on your Kubernetes master.</li>
</ul></li>
<li><code>api.euwest2.dev.avi.k8s.com</code> is resolving to an IP address where your nothing is listening.

<ul>
<li><code>208.73.210.217</code>?</li>
</ul></li>
<li>You have the wrong port configured for your kube-apiserver on your ~/.kube/config

<ul>
<li><code>server: https://api.euwest2.dev.avi.k8s.com:6443</code>?</li>
</ul></li>
</ul>
