Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Method ‘kubectl’ is not known #132

Open
CsBigDataHub opened this issue Jun 26, 2024 · 3 comments
Open

Error: Method ‘kubectl’ is not known #132

CsBigDataHub opened this issue Jun 26, 2024 · 3 comments

Comments

@CsBigDataHub
Copy link

CsBigDataHub commented Jun 26, 2024

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
Copy link
Owner

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
Copy link
Author

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

@linktohack
Copy link

Adding this before loading `recentf should help:

(with-eval-after-load 'tramp
  (add-to-list 'tramp-methods `("kubectl"))) ; recent files, places & bookmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants