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

stern not found if install stern by kubectl krew #3

Closed
karnzx opened this issue May 15, 2023 · 3 comments
Closed

stern not found if install stern by kubectl krew #3

karnzx opened this issue May 15, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@karnzx
Copy link

karnzx commented May 15, 2023

Hi, First of all I think this couldn't really be an issue at all but it will be greatly appreciated if the plugin cover this little problem.

I install stern with krew by kubectl krew install stern in my powershell teminal.
To use stern I have to run kubectl stern instead of single stern command
so when using this plugin on lens I got this error.

PS C:\Users\user> stern deployment/web --color auto --namespace project_namespace --since 1s
stern : The term 'stern' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or 
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ stern deployment/web --color auto --namespace project_n ...
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (stern:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

My solution is to mapping kubectl stern command to stern for example in powershell terminal.

function stern {
    kubectl stern $args
}
@andrea-falco andrea-falco added the enhancement New feature or request label May 15, 2023
@andrea-falco andrea-falco self-assigned this May 15, 2023
@andrea-falco
Copy link
Owner

Hi @karnzx, during next days I'll try to do something to fix this "issue".

I don't know if Lens Extension API have something to do this, but in any case I could create a specific settings (in Lens/OpenLens settings page) to enable in this case.

@andrea-falco
Copy link
Owner

Hi @karnzx, I have just released a new version (v0.3.3) which includes a new preference to flag if you have installed stern via krew.

You can see below a screeenshot of the new preference:

lens-multi-pod-logs_krew-preference

@andrea-falco andrea-falco pinned this issue Jul 23, 2023
@karnzx
Copy link
Author

karnzx commented Jul 24, 2023

wonderful, thank you!

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

No branches or pull requests

2 participants