Bug: getting credentials: exec: executable aws not found
macmiranda opened this issue · 4 comments
Hi @ricoberger,
Running into a bug on macOS Ventura (M1 chip). Clusters config is read from .kube/config
, which does client authentication via exec-based plugin (aws
) considering that those are EKS clusters.
We use different profiles for different clusters like so:
- name: staging
user:
exec:
apiVersion: client.authentication.k8s.io/v1beta1
args:
- eks
- get-token
- --cluster-name
- eks-cluster-staging
command: aws
env:
- name: AWS_DEFAULT_REGION
value: eu-central-1
- name: AWS_PROFILE
value: staging
interactiveMode: IfAvailable
provideClusterInfo: false
kubectl
works fine.
When running kubenav
, it does recognize the clusters but cannot find the aws
executable although it's in the PATH. See log excerpt below:
Time: 2023-01-27 11:23:54.377906
Name: KubenavDesktop kubernetesRequest
Message: Result of the kubernetesRequest function
Detail: {"error": "Get 'https://*****.eu-central-1.eks.amazonaws.com/api/v1/events?fieldSelector=type%3DWarning': getting credentials: exec: executable aws not found
It looks like you are trying to use a client-go credential plugin
Time: 2023-01-27 11:23:54.377995
Name: KubernetesService getRequest
Message: Get request failed
Detail: FormatException: Control character in string (at character 189)
...lector=type%3DWarning': getting credentials: exec: executable aws not found
^
Hi @macmiranda, thanks for reporting🙂. I already tested this and added the paths in this PR #459 so it was working for me.
What is the location of your aws
binary, maybe we also have to add this path.
Mine is at /opt/homebrew/bin/aws
, which is a pretty common location for macOS users.
I tried to edit the file in the /Applications/kubenav.app/Contents/Info.plist
as a regular user and it failed so then I ran sudo -i
and tried again and the file was gone 🤷🏼♂️
Can you try the binary from the following GitHub Action https://github.com/kubenav/kubenav/actions/runs/4024802087
It works 🎉
Thanks