Good morning everyone.
I have a cluster installed on Oracle using their orchestration engine (OKE). I am able to access the cluster using kubectl from the command line, but when I use the same config from Lens, it fails to find the Oracle CLI (oci), which is installed and in the path.
E1005 14:03:45.746907 62224 proxy_server.go:147] Error while proxying
request: getting credentials: exec: executable oci not found
NOTE: I did find that if I add the full path for oci to the config file, it works, but I am unclear why Lens does not use the PATH or have a way to specify the PATH to use for finding these executables.
Any pointers to a solution are appreciated. Thanks.
Hello, your situation may be analogous to GKE cluster connect error: executable gke-gcloud-auth-plugin not found. I’ve no experience with OKE but I assume there is similar tooling to that of GKE, and you could try some of the suggestions in this post, with respect to OKE tools instead of GKE.
@jehrismann , that didn’t really solve the issue as it was about making sure the tools are installed and on your path. Both of those are true for me and I can use the tools at the command line by just entering oci. It is that Lens does not seem to use that path when executed on my Mac. Therefore, it does not think oci is a valid command, despite it working fine. Like I said, if I put the full path into the kubectl config file, it also works, but requires an additional step each time I update the config file.
To run oci Lens opens a shell and tries to set the environment accordingly for that type of shell (typically zsh on mac). So Lens does use the PATH, it just seems to not be the same PATH, particularly if the terminal shell that you run is different than the one Lens is configured to use (check Preferences → Terminal → TERMINAL SHELL PATH). Are they the same? Normally they are unless you change one or the other. Also, did you try starting Lens from the terminal where you know oci and kubectl work? If that doesn’t help you could post the logs (from the console that you started Lens in).
Oddly, I went and undid the changes to the config (even recreated it) and things are working fine now. I swear they were not working before and /usr/local/bin has been in my path the entire time (as I use homebrew). Anyway, I cannot reproduce this now, so I will cross my fingers it keeps working :). Thanks.