<p>I have <code>~/.kube/config</code> with following content:</p>

<pre><code>apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: REDACTED
    server: https://REDACTED.yl4.us-east-1.eks.amazonaws.com
  name: kubernetes-jenkins
- cluster:
    certificate-authority-data: REDACTED
    server: https://REDACTED.sk1.us-east-1.eks.amazonaws.com
  name: kuberntes-dev
contexts:
- context:
    cluster: kubernetes-dev
    user: aws-dev
  name: aws-dev
- context:
    cluster: kubernetes-jenkins
    user: aws-jenkins
  name: aws-jenkins
current-context: aws-dev
kind: Config
preferences: {}
users:
- name: aws-dev
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - token
      - -i
      - EKS_DEV_CLUSTER
      command: heptio-authenticator-aws
      env: null
- name: aws-jenkins
  user:
     exec:
       apiVersion: client.authentication.k8s.io/v1alpha1
       args:
       - token
       - -i
       - EKS_JENKINS_CLUSTER
       command: heptio-authenticator-aws
       env: null
</code></pre>

<p>But when I'm trying to <code>kubectl cluster-info</code> I get:</p>

<pre><code>Kubernetes master is running at http://localhost:8080

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
The connection to the server localhost:8080 was refused - did you specify the right host or port?
</code></pre>

<p>As far as I understand something wrong in my kubeconfig, but I don't see what exactly. 
Also I tried to find any related issues, but with no luck.</p>

<p>Could you suggest me something?</p>

<p>Thanks.</p>

Aleksandr Stasko
<p>You need to choose the context that you'd like to use. More informantion on how use multiple clusters with multiple users <a href="https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/" rel="nofollow noreferrer">here</a>.</p>

<p>Essentially, you can view your current context (for the current cluster configured)</p>

<pre><code>$ kubectl config current-context
</code></pre>

<p>To view, all the clusters configured:</p>

<pre><code>$ kubectl config get-clusters
</code></pre>

<p>And to choose your cluster:</p>

<pre><code>$ kubectl config use-context &lt;cluster-name&gt;
</code></pre>

<p>There are options to set different users per cluster in case you have them defined in your <code>~/kube/config</code> file.</p>
