kURL installers will pre-install the krew plugin in your embedded cluster. However, there was an issue in all kURL versions up to v2020.02.05-0.
Here is the symptom:
$ kubectl krew upgrade F0206 19:16:28.346934 26429 root.go:58] failed to update the local index: fetch index at "/opt/replicated/krew/index" failed: command execution failure, output="": exec: "git": executable file not found in $PATH
The patch has been provided in the latest versions of kURL, and is only applied to new installations, however there’s a simple way to patch your existing cluster. a) install git, and b) change permissions on a couple of directories.
Here’s the procedure:
a) Install git
$ sudo apt-get update $ sudo apt-get install git -y
$ sudo yum install git
b) Change permissions on these of directories:
$ sudo chmod -R a+rw /opt/replicated/krew $ sudo chmod -R a+rw /tmp/krew-downloads
And then your krew plugin should work:
$ kubectl krew upgrade Updated the local copy of plugin index. Skipping plugin support-bundle, it is already on the newest version Upgraded plugin: krew Skipping plugin outdated, it is already on the newest version Skipping plugin preflight, it is already on the newest version