You are looking at the documentation of a prior release. To read the documentation of the latest release, please
visit here.
Install Stash kubectl Plugin
Stash provides a kubectl
plugin to interact with Stash resources.
Install using Krew
Stash kubectl
plugin can be installed using Krew. Krew is the plugin manager for kubectl command-line tool. To install follow the steps below:
Install
krew
following the steps here.If you have already installed
krew
, please upgradekrew
to version v0.4.0 or later so that you can use custom plugin indexes.
kubectl krew upgrade
kubectl krew version
- Add AppsCode’s kubectl plugin index. If you have already added the index, update the index.
kubectl krew index add appscode https://github.com/appscode/krew-index.git
kubectl krew index list
kubectl krew update
- Install Stash
kubectl
plugin following the commands below:
kubectl krew install appscode/stash
kubectl stash version
- If Stash
kubectl
plugin is already installed, run the following command to upgrade the plugin:
kubectl krew upgrade
kubectl stash version
Install using pre-built binary
You can download the pre-build binaries from stashed/cli releases and put it into one of your installation directory denoted by $PATH
variable.
Here is a simple Linux command to install the latest 64-bit Linux binary directly into your /usr/local/bin
directory:
# Linux amd 64-bit
curl -o kubectl-stash.tar.gz -fsSL https://github.com/stashed/cli/releases/download/v0.11.10/kubectl-stash-linux-amd64.tar.gz \
&& tar zxvf kubectl-stash.tar.gz \
&& chmod +x kubectl-stash-linux-amd64 \
&& sudo mv kubectl-stash-linux-amd64 /usr/local/bin/kubectl-stash \
&& rm kubectl-stash.tar.gz LICENSE.md
# Mac OSX 64-bit
curl -o kubectl-stash.tar.gz -fsSL https://github.com/stashed/cli/releases/download/v0.11.10/kubectl-stash-darwin-amd64.tar.gz \
&& tar zxvf kubectl-stash.tar.gz \
&& chmod +x kubectl-stash-darwin-amd64 \
&& sudo mv kubectl-stash-darwin-amd64 /usr/local/bin/kubectl-stash \
&& rm kubectl-stash.tar.gz LICENSE.md
If you prefer to install kubectl Stash cli from source code, make sure that your go development environment has been setup properly. Then, just run:
go get github.com/stashed/cli/...
Please note that this will install Stash cli from master branch which might include breaking and/or undocumented changes.