headlamp-k8s / headlamp

A Kubernetes web UI that is fully-featured, user-friendly and extensible
https://headlamp.dev
Apache License 2.0
2.22k stars 156 forks source link

AWS EKS token is not working #2255

Closed mo-saeed closed 1 month ago

mo-saeed commented 2 months ago

Hi,

As discussed in this thread https://kubernetes.slack.com/archives/C01FXB5E8ER/p1723803960266089. I am having login issue using aws eks get-token command. I see that in the browser devtools console

auth failed: Error: Forbidden - selfsubjectrulesreviews.authorization.k8s.io is forbidden: User "system:anonymous" cannot create resource "selfsubjectrulesreviews" in API group "authorization.k8s.io" at the cluster scope

my user has cluster admin. the token works with kubectl, openlens, k8s dashboard.

I am also impacted by this https://github.com/headlamp-k8s/headlamp/issues/1716

illume commented 1 month ago

There's some fixes for this in the main branch now. It will be in the next release v0.26.0.

mo-saeed commented 1 month ago

Unfortunately the issues are still there. Tested on 2 mac and didn't work and one linux machine the kubeconfig was loaded but the token is not working. Can you please re-open ?

mo-saeed commented 1 month ago

Hi, I found the issue with Headlamp and EKS, when I run aws eks update-kubeconfig command to get the kubeconfig, the default context name is the EKS cluster ARN which seems to be the issue, when i changed the context to short string, it worked fine. I think the context name maybe used somewhere in the code and break sth as it contains : and / but not sure. maybe you can check that, but for me i am fine with changing the context name. but I think its important to clarify that for the new users.