kubernetes-sigs / krew

📦 Find and install kubectl plugins
https://krew.sigs.k8s.io
Apache License 2.0
6.42k stars 369 forks source link

krew is getting uninstalled after restarting the linux server #818

Closed teja-rafay closed 1 year ago

teja-rafay commented 1 year ago

After installing when I restart my linux machine the krew is getting uninstalled

ahmetb commented 1 year ago

Sorry that's not enough information for me to understand what is going on. Most likely it's a behavior with your set up. Krew is installed in $HOME/.krew and if it's disappearing on every restart, there's nothing much we can help with, since it sounds like it's specific to your set up.

/kind support

teja-rafay commented 1 year ago

Is there any way we can check this if it is the problem with my setup or something else?

ahmetb commented 1 year ago

You can ls -al $HOME, see if .krew is there, and see if it persists between reloads.

Another issue might be that you did not update your shell profile file with the export PATH command after installation, as instructed in the installation instructions.

You can try reinstalling and follow the post-installation instructions more closely.

/close

k8s-ci-robot commented 1 year ago

@ahmetb: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/krew/issues/818#issuecomment-1427394792): >You can `ls -al $HOME`, see if `.krew` is there, and see if it persists between reloads. > >Another issue might be that you did not update your shell profile file with the `export PATH` command after installation, as instructed in the installation instructions. > >You can try reinstalling and follow the post-installation instructions more closely. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
teja-rafay commented 1 year ago

I checked with ls -al $HOME, .krew is present. I also did export it a post installation steps and after that when I restart the system it is saying ubuntu@teja-20230202-1-18-1-21:~$ kubectl krew Error: unknown command "krew" for "kubectl" Run 'kubectl --help' for usage.

ahmetb commented 1 year ago

Sorry but I recommend seeking help at other forums to troubleshoot shell/PATH issues. :) If kubectl-krew binary is not in your PATH and you are unsure how to check, plenty of resources available on the web.

teja-rafay commented 1 year ago

the binary is present in my path

rajatjindal commented 1 year ago

This sometime happens if kubectl is pointing to a bash function or alias. Can u try it with absolute path of kubectl