Skip to content
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 while adding cluster(s): User Exec command "aws" not found on host. Please ensure binary is found in PATH or use absolute path to binary in Kubeconfig #2290

Closed
leandroholanda opened this issue Mar 5, 2021 · 12 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@leandroholanda
Copy link

Describe the bug
I'm trying to add a CLUSTER to my LENS, but I'm having this error, even though I have AWS in PATH, as shown in the images below:
image

When I try add cluster, I get this error:
"Error while adding cluster(s): User Exec command "aws" not found on host. Please ensure binary is found in PATH or use absolute path to binary in Kubeconfig"
But I checked my PATH and my KUBECTL and is there:
image

To Reproduce

  1. I Install the program (.exe) fresh install in the standard folrder.
  2. Open Lens
  3. Click on ADD CLUTER
  4. Try to save

Expected behavior
Cluster added

Screenshots
image
AWS is working fine.
Kubectl too.

Environment (please complete the following information):

  • Lens Version: I tried 4.1.2 , 4.1.3 , 4.1.4.
  • OS: Windows 10
  • Installation method (e.g. snap or AppImage in Linux): .EXE File.

Logs:
I cann't found that logs.

Kubeconfig:
image

Additional context
I will tell you, step by step what I DO:

  1. I create a config with that command:
    image
  2. Second I selected:
    image
  3. Then I go to Lens do add CLUSTER and a I get this error:
    image

I tried to use kubectl in terminal do bring to me some information, and is working fine. The problem is in LENS program.
Please someone can help me.
Thanks.

@leandroholanda leandroholanda added the bug Something isn't working label Mar 5, 2021
@darkn3rd
Copy link

darkn3rd commented Mar 8, 2021

There's no way to INJECT values that I can tell with Lens, so there can be these issues:

  • it aws is bootstraps from pyenv environment (or other python version manager), then it will not be able to pick up aws without loading the pyenv environment. Even if the full path is used, the python environment that aws needs may not be there.
  • if aws command to get a token for access to EKS cluster requires a particular AWS_PROFILE, such as mycompany-prod, then this will fail.

@jim-docker
Copy link
Contributor

Does it work if you use the absolute path to aws in your kubeconfig?

@leandroholanda
Copy link
Author

leandroholanda commented Mar 8, 2021

There's no way to INJECT values that I can tell with Lens, so there can be these issues:

  • it aws is bootstraps from pyenv environment (or other python version manager), then it will not be able to pick up aws without loading the pyenv environment. Even if the full path is used, the python environment that aws needs may not be there.
  • if aws command to get a token for access to EKS cluster requires a particular AWS_PROFILE, such as mycompany-prod, then this will fail.

1- It's not the case, because we're not using aws with pyenv .
2 - And EKS cluster no requires a particular AWS_PROFILE .

@leandroholanda
Copy link
Author

leandroholanda commented Mar 8, 2021

Does it work if you use the absolute path to aws in your kubeconfig?

I tried use absolute PATH in kubeconfig too. Not working at all.
And I tried using absolute PATH in aws too, did not work.

@leandroholanda
Copy link
Author

leandroholanda commented Mar 12, 2021

About Logs: I found that In logs, is that an error?? And is related?

image

@memelet
Copy link

memelet commented Mar 13, 2021

I see this same problem on linux. I have installed aws via brew.

$ echo $PATH
/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:...
$ which aws 
/home/linuxbrew/.linuxbrew/bin/aws

The only way (so far) I could get this to work was to create links in /usr/local/bin.

@jim-docker jim-docker added this to the 4.3.0 milestone Mar 15, 2021
@Nokel81 Nokel81 self-assigned this Mar 22, 2021
@Nokel81 Nokel81 modified the milestones: 4.3.0, 5.0.0 Mar 23, 2021
@bitisuvanje
Copy link

On Windows, assuming you have a default AWS profile configured, use the absolute path of the aws.exe in your .kube config like:

command: "C:\\Program Files\\Amazon\\AWSCLIV2\\aws.exe"

@leandroholanda
Copy link
Author

On Windows, assuming you have a default AWS profile configured, use the absolute path of the aws.exe in your .kube config like:

command: "C:\\Program Files\\Amazon\\AWSCLIV2\\aws.exe"

I tried in config file, don't work.

@sanjaykulkarni04
Copy link

@jim-docker Can you please help me how to resolve this issue?

@leandroholanda Was your issue resolved? If yes how? Can you please assist me?

Thanks,
Sanjay

@jim-docker
Copy link
Contributor

@sanjaykulkarni04 have you tried the absolute path workaround suggested above? Meanwhile we'll try to investigate further for 5.0.0

@sanjaykulkarni04
Copy link

@sanjaykulkarni04 have you tried the absolute path workaround suggested above? Meanwhile we'll try to investigate further for 5.0.0

@jim-docker Yes, already tried. But no luck

Thanks,
Sanjay

@msa0311 msa0311 modified the milestones: 5.0.0, 5.0.1 Jun 14, 2021
@sanjaykulkarni04
Copy link

@jim-docker and @team after installing latest updates my issue has been resolved. Thank you so much.

Regards,
Sanjay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants