Recently, I noticed that some of my kubernetes contexts, when I access them via Lens, I can’t run kubectl commands in the Lens terminal, but using the same context on the native Mac Terminal, allows me run kubectl commands.
For context, the error I keep getting is 137 [1] killed . This error is usually from K8s pods, so I am not sure why I am getting the error without being connected to any pod. Any ideas would be great. Thanks
So I followed the recommendation here: Kubectl is killed in lens desktop terminal, cannot exec to pods, which meant I changed my kubectl binary path, to the very one being used by the terminal. After restarting, the terminal no longer comes up, just stays stuck in “Connecting…”
firstly check your terminal session in lens, by doing which kubectl . Mine is
raghavarora@raghav ~ % which kubectl
/Users/raghavarora/Library/Application Support/Lens/binaries/kubectl/1.30/kubectl
then override the lens path for kubectl by creating a symlink