kubernetes-sigs / krew

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

latest krew not working on Linux #749

Closed dove-young closed 2 years ago

dove-young commented 2 years ago

Usage: kubectl krew [command]

Available Commands: completion generate the autocompletion script for the specified shell help Help about any command index Manage custom plugin indexes info Show information about an available plugin install Install kubectl plugins list List installed kubectl plugins search Discover kubectl plugins uninstall Uninstall plugins update Update the local copy of the plugin index upgrade Upgrade installed plugins to newer versions version Show krew version and diagnostics

Flags: -h, --help help for krew -v, --v Level number for the log level verbosity

Use "kubectl krew [command] --help" for more information about a command. [root@st2-tunnel-dev1 bin]#


- check `kubectl krew list`, it fails

[root@st2-tunnel-dev1 bin]# kubectl krew list -v 9 I1214 19:50:31.385982 805717 root.go:221] Ensure creating dir: "/root/.krew" I1214 19:50:31.386041 805717 root.go:221] Ensure creating dir: "/root/.krew/store" I1214 19:50:31.386048 805717 root.go:221] Ensure creating dir: "/root/.krew/bin" I1214 19:50:31.386056 805717 root.go:221] Ensure creating dir: "/root/.krew/index" I1214 19:50:31.386062 805717 root.go:221] Ensure creating dir: "/root/.krew/receipts" This version of Krew is not supported anymore. Please manually migrate:

  1. Uninstall Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/uninstall/
  2. Install latest Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/install/
  3. Install the plugins you used F1214 19:50:31.386144 805717 root.go:77] krew home outdated sigs.k8s.io/krew/cmd/krew/cmd.preRun /home/runner/work/krew/krew/cmd/krew/cmd/root.go:149 github.com/spf13/cobra.(Command).execute /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:835 github.com/spf13/cobra.(Command).ExecuteC /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 github.com/spf13/cobra.(*Command).Execute /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902 sigs.k8s.io/krew/cmd/krew/cmd.Execute /home/runner/work/krew/krew/cmd/krew/cmd/root.go:75 main.main /home/runner/work/krew/krew/cmd/krew/main.go:25 runtime.main
[root@st2-tunnel-dev1 bin]# ./kubectl-krew version
This version of Krew is not supported anymore. Please manually migrate:
1. Uninstall Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/uninstall/
2. Install latest Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/install/
3. Install the plugins you used
F1214 19:51:29.195740  805785 root.go:79] krew home outdated
goroutine 1 [running]:
k8s.io/klog/v2.stacks(0xc000182001, 0xc0000c5d80, 0x3d, 0x40)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:1021 +0xb9
k8s.io/klog/v2.(*loggingT).output(0xea5d20, 0xc000000003, 0x0, 0x0, 0xc000277ce0, 0xc12ae0, 0x7, 0x4f, 0x40e000)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:970 +0x191
k8s.io/klog/v2.(*loggingT).printDepth(0xea5d20, 0xc000000003, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc0002980b0, 0x1, 0x1)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:733 +0x16f
k8s.io/klog/v2.(*loggingT).print(...)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:715
k8s.io/klog/v2.Fatal(...)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:1489
sigs.k8s.io/krew/cmd/krew/cmd.Execute()
        /home/runner/work/krew/krew/cmd/krew/cmd/root.go:79 +0x254
main.main()
        /home/runner/work/krew/krew/cmd/krew/main.go:25 +0x45

goroutine 18 [chan receive]:
k8s.io/klog/v2.(*loggingT).flushDaemon(0xea5d20)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:1164 +0x8b
created by k8s.io/klog/v2.init.0
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:418 +0xdf
[root@st2-tunnel-dev1 bin]#
[root@st2-tunnel-dev1 bin]# cd /tmp/tmp.pBpP8wFx59/
[root@st2-tunnel-dev1 tmp.pBpP8wFx59]# ./krew-linux_amd64 version
This version of Krew is not supported anymore. Please manually migrate:
1. Uninstall Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/uninstall/
2. Install latest Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/install/
3. Install the plugins you used
F1214 19:52:04.244860  805823 root.go:79] krew home outdated
goroutine 1 [running]:
k8s.io/klog/v2.stacks(0xc00000e001, 0xc000025e40, 0x3d, 0x40)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:1021 +0xb9
k8s.io/klog/v2.(*loggingT).output(0xea5d20, 0xc000000003, 0x0, 0x0, 0xc000249dc0, 0xc12ae0, 0x7, 0x4f, 0x40e000)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:970 +0x191
k8s.io/klog/v2.(*loggingT).printDepth(0xea5d20, 0xc000000003, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc000246430, 0x1, 0x1)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:733 +0x16f
k8s.io/klog/v2.(*loggingT).print(...)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:715
k8s.io/klog/v2.Fatal(...)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:1489
sigs.k8s.io/krew/cmd/krew/cmd.Execute()
        /home/runner/work/krew/krew/cmd/krew/cmd/root.go:79 +0x254
main.main()
        /home/runner/work/krew/krew/cmd/krew/main.go:25 +0x45

goroutine 6 [chan receive]:
k8s.io/klog/v2.(*loggingT).flushDaemon(0xea5d20)
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:1164 +0x8b
created by k8s.io/klog/v2.init.0
        /home/runner/go/pkg/mod/k8s.io/klog/v2@v2.8.0/klog.go:418 +0xdf
[root@st2-tunnel-dev1 tmp.pBpP8wFx59]#
ahmetb commented 2 years ago

Based on #748 I'm fairly sure you're doing something unusual. Messing with ~/.krew directory as you did in that issue will cause all sorts of trouble like this one.

To make sure, I just tried it and it works just fine. image

/close /kind question

k8s-ci-robot commented 2 years ago

@ahmetb: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/krew/issues/749#issuecomment-994370731): >Based on #748 I'm fairly sure you're doing something unusual. Messing with ~/.krew directory as you did in that issue will cause all sorts of trouble like this one. > >To make sure, I just tried it and it works just fine. >![image](https://user-images.githubusercontent.com/159209/146135971-a7f9420d-4143-469d-8680-331fe976a6cb.png) > > >/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.