<p>When running an EKS cluster, the best way to configure your <code>~/.kube/config</code> is by using the <a href="https://docs.aws.amazon.com/cli/latest/reference/eks/update-kubeconfig.html" rel="nofollow noreferrer">SDK's update-kubeconfig</a>:</p>

<pre><code>aws eks update-kubeconfig --name your-cluster-name
</code></pre>

<p>Make sure to configure your credentials as <code>AWS_*</code> environment variables. Or even better use something like <a href="https://github.com/99designs/aws-vault" rel="nofollow noreferrer">aws-vault</a>.</p>

CC BY-SA 4.0
2020-03-19T15:14:39.803Z
for this I need to have access to aws cli, but I only have access to kub dashboard, so I wonder if it possible to get kubernetes server api from there
ogbofjnr
CC BY-SA 4.0
2020-03-19T15:25:59.430Z
You should be able to see the Cluster URL via the web console. Just navigate to your cluster via the EKS menu and look for the API Server URL.
davidmontoyago
CC BY-SA 4.0
2020-03-19T15:03:45.620Z
2020-03-19T15:03:45.620Z
davidmontoyago
<p>I have access to kubernetes dashboard on aws with token. And now I want to connect with kubectl, how to get server url for kubectl config?</p>

<kubernetes><kubectl>
How to get server url from kub dashboard?
ogbofjnr
# How to get server url from kub dashboard?

(Asked by: username_0 on 2020-03-19)

I have access to kubernetes dashboard on aws with token. And now I want to connect with kubectl, how to get server url for kubectl config?

**Tags:** kubernetes, kubectl


---

## 1 answers

### Answer by username_1 on 2020-03-19. Score: 1

When running an EKS cluster, the best way to configure your ~/.kube/config is by using the SDK's update-kubeconfig:
aws eks update-kubeconfig --name your-cluster-name

Make sure to configure your credentials as AWS_* environment variables. Or even better use something like aws-vault.

> **Comments:**
> **username_0**: for this I need to have access to aws cli, but I only have access to kub dashboard, so I wonder if it possible to get kubernetes server api from there  
> **username_1**: You should be able to see the Cluster URL via the web console. Just navigate to your cluster via the EKS menu and look for the API Server URL.  

---

