-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Error: Unable to connect to the server: getting credentials: exec: exec: "aws": executable file not found in $PATH #1562
Comments
I'm thinking this is happening b/c for cli version 2 I have to use aws2-based commands not aws, should I switch to v1? Similar issue reported here: kubernetes-sigs/aws-iam-authenticator#132 |
Same issue on Windows 10 workstation Unable to connect to the server: getting credentials: exec: exec: "aws": executable file not found in %PATH% |
Ok so somewhat similar to the issue #132 listed above, I fixed it I believe: Edit the kub config file directly: Go down to this section: user: and change the command field to: You should now be able to run: |
What is the long term solution for this issue? |
Hi Experts, But while giving command eksctl version for server i am getting below response 👍 I tried verious version but no luck. I have windows 8 computer and trying to connect to AWS EKS cluster. I am able to create cluster successfully with eksctl. Kindly help ! |
I'm facing similar issue while switching to user (devops) from root user on RedHat linx OS machine. su - devopsLast login: Tue Apr 21 05:57:03 UTC 2020 on pts/3 aws cli version is v1 only and ~/.kube/config has below settings: user: $ aws --version Please help to resolve it! |
Do a "which aws" for me it is /usr/local/bin/aws and then mention the whole path in kubeconfig file command: /usr/local/bin/aws See if this helps |
Thanks @ssaila . Indeed it helped when I provided full path. For me it was under ~/.local/bin/ and I have to provide full path /home/devops/.local/bin/aws |
There seem to be 2 issues here:
To write the whole path of the executable would bypass the purpose of |
Closing this, if the above solutions/comments don't work for you, let us know here. |
what is the solution for this error |
Do a "which aws" (for eg : /usr/local/bin/aws) and then mention the whole path in kubeconfig file command: /usr/local/bin/aws |
This error bug saved me. I had this issue with a cronjob only. it worked well from a shell.
Thanks |
That worked! Adding the whole path did the trick. I set it up on Windows so it is C:\Program Files\Amazon\AWSCLIV2\aws if anyone needs it. |
A similar situation is with |
Where & How to add this line? |
What happened?
Error: Unable to connect to the server: getting credentials: exec: exec: "aws": executable file not found in $PATH
I successfully created a cluster with
$ eksctl create cluster
Then successfully ran:
$ sudo aws2 eks --region ${REGION} update-kubeconfig --name ${CLUSTER_ID}
Then tried
$ kubectl get nodes
but got the error listed above.In addition,
$ aws-iam-authenticator init
returns could not get config: cluster ID cannot be emptyAnything else we need to know?
Versions
Logs
Include the output of the command line when running eksctl.
$ eksctl get clusters -v 4
returnsrole ARN for the current session is "xxxxxxxxxxxxxx"
NAME REGION
${CLUSTER_ID} ${REGION}
To rule out IAM auth issues:
$ aws-iam-authenticator token -i environment_name.region.environment_type
returns error-freeThe text was updated successfully, but these errors were encountered: