VolSync CLI / kubectl plugin
VolSync provides a CLI interface to assist in performing common operations using the VolSync operator.
All the tasks that can be accomplished via this CLI can also be performed by directly manipulating VolSync’s ReplicationSource and ReplicationDestination objects. It is meant as a simple shortcut for common operations:
Installation
The VolSync CLI (kubectl plugin) can be installed in several ways:
Via krew (easiest)
Downloading the latest released binary from GitHub
From source (requires a working golang installation)
Krew is a plugin manager for the
kubectl
command. It automates the process of downloading,
installing, and updating kubectl plugins.
If you have Krew installed, you can install the VolSync plugin via:
# Install the VolSync plugin
$ kubectl krew install volsync
Updated the local copy of plugin index.
Installing plugin: volsync
Installed plugin: volsync
\
| Use this plugin:
| kubectl volsync
| Documentation:
| https://github.com/backube/volsync
/
WARNING: You installed plugin "volsync" from the krew-index plugin repository.
These plugins are not audited for security by the Krew maintainers.
Run them at your own risk.
# Use it...
$ kubectl volsync --version
volsync version v0.4.0+b710c5f
The plugin can be uninstalled via:
# Uninstall the VolSync plugin
$ kubectl krew uninstall volsync
Uninstalled plugin: volsync
Future upgrades are also possible via kubectl krew upgrade volsync
.
The plugin is available on the VolSync Releases page. Download the
kubectl-volsync.tar.gz
and place the included kubectl-volsync
binary into your PATH. The plugin should then be available as a
sub-command of kubectl
:
$ kubectl volsync --version
volsync version v0.4.0+b710c5f
To uninstall, just delete the kubectl-volsync
binary.
The plugin can be installed directly from source. This requires a
working golang environment, but it also allows easily choosing the
version to be installed (even the latest code from main
).
The latest Released version can be installed via:
$ go install github.com/backube/volsync/kubectl-volsync@latest
go: downloading github.com/backube/volsync v0.4.0
$ which kubectl-volsync
~/go/bin/kubectl-volsync
The latest code from main can be installed via:
$ go install github.com/backube/volsync/kubectl-volsync@main
go: downloading github.com/backube/volsync v0.3.1-0.20220512205923-e33a7e4d88b6
Once installation is complete, navigate to one of the documentation sub-pages for some CLI usage examples.