# Failed to get /version for clusterId= Unauthorized

**URL:** https://forums.k8slens.dev/t/failed-to-get-version-for-clusterid-unauthorized/497
**Category:** Lens Support & Troubleshooting
**Tags:** macos, support
**Created:** [May 26, 2023, 4:12pm UTC](https://forums.k8slens.dev/t/failed-to-get-version-for-clusterid-unauthorized/497 "2023-05-26T16:12:42Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![pnrao.83](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/p/df788c/32.png) [@pnrao.83](https://forums.k8slens.dev/u/pnrao.83)
#### Post date: [May 26, 2023, 4:12pm UTC](https://forums.k8slens.dev/t/failed-to-get-version-for-clusterid-unauthorized/497/1 "2023-05-26T16:12:43Z")

</div>

Hi Team,  
When I try to connect the kubernetes cluster i got into below issue:  
Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized  
I can connect to my cluster using kubectl from Mac terminal.

---

<div class="post-metadata">

### Author: ![pnrao.83](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/p/df788c/32.png) [@pnrao.83](https://forums.k8slens.dev/u/pnrao.83)
#### Post date: [May 26, 2023, 4:14pm UTC](https://forums.k8slens.dev/t/failed-to-get-version-for-clusterid-unauthorized/497/2 "2023-05-26T16:14:54Z")

</div>

Here is my kube config.  
➜ ~ k config view --minify  
apiVersion: v1  
clusters:

- cluster:  
certificate-authority-data: DATA+OMITTED  
server: [https://XXXXXXXX.sk1.us-west-1.eks.amazonaws.com](https://XXXXXXXX.sk1.us-west-1.eks.amazonaws.com)  
name: arn:aws:eks:us-west-1:XXXXXXXX:cluster/kkrwest-eks0  
contexts:
- context:  
cluster: arn:aws:eks:us-west-1:XXXXXXXX:cluster/kkrwest-eks0  
user: arn:aws:eks:us-west-1:XXXXXXXX:cluster/kkrwest-eks0  
name: arn:aws:eks:us-west-1:XXXXXXXX:cluster/kkrwest-eks0  
current-context: arn:aws:eks:us-west-1:XXXXXXXX:cluster/kkrwest-eks0  
kind: Config  
preferences: {}  
users:
- name: arn:aws:eks:us-west-1:XXXXXXXX:cluster/kkrwest-eks0  
user:  
exec:  
apiVersion: [client.authentication.k8s.io/v1beta1](http://client.authentication.k8s.io/v1beta1)  
args:  
- --region  
- us-west-1  
- eks  
- get-token  
- --cluster-name  
- kkrwest-eks0  
command: aws  
env:  
- name: AWS\_PROFILE  
value: AWSAdministratorAccess-XXXXXX  
interactiveMode: IfAvailable  
provideClusterInfo: false  
➜ ~

---

<div class="post-metadata">

### Author: ![pnrao.83](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/p/df788c/32.png) [@pnrao.83](https://forums.k8slens.dev/u/pnrao.83)
#### Post date: [May 26, 2023, 4:21pm UTC](https://forums.k8slens.dev/t/failed-to-get-version-for-clusterid-unauthorized/497/3 "2023-05-26T16:21:34Z")

</div>

ailed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

Failed to get /version for clusterId=d01ecc1e4120e55ab1b1ef6dae0d707c: Unauthorized

---

<div class="post-metadata">

### Author: ![dev-chirag](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/d/58956e/32.png) [@dev-chirag](https://forums.k8slens.dev/u/dev-chirag)
#### Post date: [June 27, 2023, 2:02pm UTC](https://forums.k8slens.dev/t/failed-to-get-version-for-clusterid-unauthorized/497/4 "2023-06-27T14:02:05Z")

</div>

were you able to solve this? I have the exact same issue

---

<div class="post-metadata">

### Author: ![fabiano.lothor](https://forums.k8slens.dev/user_avatar/forums.k8slens.dev/fabiano.lothor/32/751_2.png) [@fabiano.lothor](https://forums.k8slens.dev/u/fabiano.lothor)
#### Post date: [October 12, 2023, 4:13pm UTC](https://forums.k8slens.dev/t/failed-to-get-version-for-clusterid-unauthorized/497/5 "2023-10-12T16:13:57Z")

</div>

For those stucked here, make sure to update your awscli to latest and update your apiVersion URL to latest.

Currently is `apiVersion: client.authentication.k8s.io/v1beta1`

---

<div class="post-metadata">

### Author: ![erick.benites](https://forums.k8slens.dev/user_avatar/forums.k8slens.dev/erick.benites/32/830_2.png) [@erick.benites](https://forums.k8slens.dev/u/erick.benites)
#### Post date: [November 22, 2023, 12:36am UTC](https://forums.k8slens.dev/t/failed-to-get-version-for-clusterid-unauthorized/497/6 "2023-11-22T00:36:54Z")

</div>

I solved this by configuring config map aws-auth:

```auto
kubectl edit configmap aws-auth --namespace kube-system

```

```auto
mapUsers: |
  - userarn: arn:aws:iam::XXXXXXXXXXXX:user/testuser
    username: testuser
    groups:
      - system:masters

```

> **[Resolve the unauthorized server error for the Amazon EKS API server](https://repost.aws/knowledge-center/eks-api-server-unauthorized-error)**
>
> I use kubectl commands to connect to the Amazon Elastic Kubernetes Service (Amazon EKS) API server. I received the message "error: You must be logged in to the server (Unauthorized)".

---

<div class="post-metadata">

### Author: ![dilshanonline](https://forums.k8slens.dev/user_avatar/forums.k8slens.dev/dilshanonline/32/1044_2.png) [@dilshanonline](https://forums.k8slens.dev/u/dilshanonline)
#### Post date: [March 7, 2024, 10:58am UTC](https://forums.k8slens.dev/t/failed-to-get-version-for-clusterid-unauthorized/497/7 "2024-03-07T10:58:06Z")

</div>

I had the same issue and tried everything on the internet but had no luck. However, opening the Lens via the launcher seems to have caused this issue, and I tried to run it from the terminal using `open /Applications/Lens.app/` and it solved my problem.

Using a Mac with Iterm2.

---

<div class="post-metadata">

### Author: ![carl.intveld](https://forums.k8slens.dev/user_avatar/forums.k8slens.dev/carl.intveld/32/1146_2.png) [@carl.intveld](https://forums.k8slens.dev/u/carl.intveld)
#### Post date: [May 3, 2024, 7:40am UTC](https://forums.k8slens.dev/t/failed-to-get-version-for-clusterid-unauthorized/497/8 "2024-05-03T07:40:40Z")

</div>

I guess I have the same issue after I have upgraded to lens 2023.9.  
Working against:

- Windows 11 laptop
- Azure Kubernetes Service 1.28
- Azure RBAC enabled auth
- User has role “Azure Kubernetes Service RBAC Cluster Admin”
- kubectl just works  
\*kubectl get --raw /version even works
- kubelogin version 0.1.0
- az cli 2.60
- using AKS with local users enabled and admin account just works in Lens. It is really the Azure RBAC user account

Finally I discovered the culprit! I am using a separate az config file which obviously is not used when Lens is running kubelogin.

---

<div class="post-metadata">

### Author: ![tkudinov](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/t/58f4c7/32.png) [@tkudinov](https://forums.k8slens.dev/u/tkudinov)
#### Post date: [May 7, 2024, 8:10am UTC](https://forums.k8slens.dev/t/failed-to-get-version-for-clusterid-unauthorized/497/9 "2024-05-07T08:10:18Z")

</div>

Hello,

Thank you for reaching out to Lens forum!

We already have the topic with the same issue. Could you try to check it, please? It may help you.

- [Adding AKS clusters to lens desktop - #9 by dheeraj.vanteru](https://forums.k8slens.dev/t/adding-aks-clusters-to-lens-desktop/226/9)

Best Regards,  
Tikhon Kudinov  
Lens Support Engineer  
Mirantis, Inc
