Make sure you have sha256sum
and jq
installed otherwise run the following brew
commands:
brew install coreutils # required for sha256sum
brew install jq # required for jq
The kubectl fdb plugin
is released as a binary as part of our release process.
For the latest version take a look at the release page.
Install from release:
pushd $TMPDIR
if [ -f "$TMPDIR/kubectl-fdb-version.txt" ]; then
rm "$TMPDIR/kubectl-fdb-version.txt"
fi
OS=$(uname)
ARCH=$(uname -m)
VERSION="$(curl -s "https://api.github.com/repos/FoundationDB/fdb-kubernetes-operator/releases/latest" | jq -r '.tag_name')"
curl -sLO "https://github.com/FoundationDB/fdb-kubernetes-operator/releases/download/${VERSION}/checksums.txt"
curl -sLO "https://github.com/FoundationDB/fdb-kubernetes-operator/releases/download/${VERSION}/kubectl-fdb_${VERSION}_${OS}_${ARCH}"
sha256sum --ignore-missing -c checksums.txt
chmod +x kubectl-fdb_${VERSION}_${OS}_${ARCH}
sudo mv ./kubectl-fdb_${VERSION}_${OS}_${ARCH} /usr/local/bin/kubectl-fdb
popd
In order to install the latest version from the source code run:
make plugin
# move the binary into your path
export PATH="${PATH}:$(pwd)/dist/kubectl-fdb_$(go env GOHOSTOS)_$(go env GOARCH)"
You can verify the version of the locally installed kubectl-fdb
binary by running:
$ kubectl fdb version --client-only
kubectl-fdb: 1.16.0
Run kubectl fdb help
to get the latest help.
We have a list of planned operations that we want to implement. Raise an issue if you miss a specific command to operate FDB on Kubernetes.
Per default the plugin will check if there is a newer version present.
For this the plugin will contact the GitHub API and check for the latest release.
If a newer version was found the command will exit with the request to update the plugin.
The version check can be disabled by setting --version-check=false
when issuing a command.
The plugin will create a local cache in the temp directory to reduce the calls to the GitHub API, the file is located under $TMPDIR/kubectl-fdb-version.txt
.