-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test success but kubectl returns "couldn't get current server API group list" #23032
Comments
Solved. It was on me. I had to use a lot of verbose, though: This returned A LOT more information on the error. I don't have the output anymore but basically the error was that the Teleport role contained multiple "kubernetes_users"**. So I ended up removing some roles for the user that was requesting access and it started working. For anyone struggling with non-descriptive kubectl errors just use the verbose flag, it will help a lot. I still need to understand better why this conflict appeared but at least I made it work. |
swapoff -a This is resolved this issue for me |
@senthil262006 where should we execute these commands? Should it be done on teleport server ? |
In case someone gets this error in future, I managed to resolve exporting AWS credentials e.g in linux
https://repost.aws/knowledge-center/eks-api-server-unauthorized-error |
This works with the newer version of kubectl, aws cli, eks and k8s - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_cluster#arn - aws cli install: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html - kubectl version: aws/aws-cli#6920 (comment) - - gravitational/teleport#23032 - https://docs.aws.amazon.com/eks/latest/userguide/create-kubeconfig.html
|
Restarting Teleport Service was the trick for me: sudo systemctl restart teleport |
Expected behavior:
Kubectl commands should return the requested resources.
Current behavior:
If I output verbose I get:
Bug details:
kubectl get nodes
)Just for reference, this is my current configuration (sensible data REDACTED):
/etc/teleport.d/conf
/etc/teleport.yaml
Generated kubeconfig when using tsh
login
The text was updated successfully, but these errors were encountered: