abrochard / kubel

Emacs extension for controlling Kubernetes with limited permissions
GNU General Public License v3.0
266 stars 44 forks source link

Error: Method ‘kubectl’ is not known #132

Open CsBigDataHub opened 3 months ago

CsBigDataHub commented 3 months ago

Hello @abrochard,

I am experiencing an error with kubel dired while trying to copy log files to local system using tramp.

Tried the same with Kubernetes-el package and it works fine.

Error in messages buffer

error in process sentinel: async-handle-result: Method ‘kubectl’ is not known
error in process sentinel: Method ‘kubectl’ is not known

toggle-debug-on-error does not trigger anything.

Using Emacs-29.4. It is a new install.

I am suspecting kubel-setup-tramp function is the culprit here.

Here is Kubernetes-el tramp method value -

("kubernetes"
  (tramp-login-program "kubectl")
  (tramp-login-args
   (("exec")
    ("%h")
    ("-it")
    ("--")
    ("%l")))
  (tramp-config-check tramp-kubernetes--current-context-data)
  (tramp-direct-async
   ("/bin/sh" "-c"))
  (tramp-remote-shell "/bin/sh")
  (tramp-remote-shell-login
   ("-l"))
  (tramp-remote-shell-args
   ("-i" "-c")))

It looks pretty similar to what you have in kubel-setup-tramp function. I am not sure why this is working and kubel tramp copy is not.

abrochard commented 3 months ago

Hi @CsBigDataHub , Yeah this is something that I've seen happen if I install the package on a machine without the kubectl CLI installed. I'm not 100% sure where it's coming from. What makes you think it's from TRAMP? I was wondering if it could be when we try to set the context on load ?

CsBigDataHub commented 2 months ago

I do have kubectl in the path. I am positive that it is coming when trying to set tramp-method.