I'm getting the following warning when trying to run the aws
client with the aws-iam-authenticator
for kubernetes:
Warning: aws-iam-authenticator is not installed properly or is not in your path.
However, the aws-iam-authenticator
is clearly in my path, since I can call aws-iam-authenticator help
and it returns results:
$ aws-iam-authenticator help
A tool to authenticate to Kubernetes using AWS IAM credentials
Usage:
heptio-authenticator-aws [command]
...
Oddly enough though, which aws-iam-authenticator
does not return successfully. So something is odd with my PATH
.
Here is a subset of my path:
echo $PATH
/usr/local/sbin:~/work/helpers/bin:~/.rbenv/shims:...:/usr/bin:/bin:/usr/sbin:/sbin
The aws-iam-authenticator
is located in ~/work/helpers/bin
Turns out the issue is because I used the ~
in my PATH
. I found this issue and comment that pointed me in the correct direction. Updating my PATH
to below solved my issue:
echo $PATH
/usr/local/sbin:/$HOME/work/helpers/bin:/$HOME/.rbenv/shims:...:/usr/bin:/bin:/usr/sbin:/sbin
# Where $HOME is expanded properly
I think it may be best practice to prefer $HOME
vs ~
in PATH
exports, but I can't find anything on SO / internet to confirm or deny.