Install the Trident protect CLI plugin
You can use the Trident protect command line plugin, which is an extension of the Trident tridentctl
utility, to create and interact with Trident protect custom resources (CRs).
Install the Trident protect CLI plugin
Before using the command line utility, you need to install it on the machine you use to access your cluster. Follow these steps, depending on if your machine uses an x64 or ARM CPU.
-
Download the Trident protect CLI plugin:
curl -L -o tridentctl-protect https://github.com/NetApp/tridentctl-protect/releases/download/24.10.0/tridentctl-protect-linux-amd64
-
Download the Trident protect CLI plugin:
curl -L -o tridentctl-protect https://github.com/NetApp/tridentctl-protect/releases/download/24.10.0/tridentctl-protect-linux-arm64
-
Download the Trident protect CLI plugin:
curl -L -o tridentctl-protect https://github.com/NetApp/tridentctl-protect/releases/download/24.10.0/tridentctl-protect-macos-amd64
-
Download the Trident protect CLI plugin:
curl -L -o tridentctl-protect https://github.com/NetApp/tridentctl-protect/releases/download/24.10.0/tridentctl-protect-macos-arm64
-
Enable execute permissions for the binary:
chmod +x tridentctl-protect
-
Copy the plugin binary to a location that is defined in your PATH variable. For example,
/usr/bin
or/usr/local/bin
(you might need elevated privileges):cp ./tridentctl-protect /usr/local/bin/
-
Optionally, you can copy the binary to a location in your home directory. In this case, you might need to add the location to your PATH variable:
cp ./tridentctl-protect ~/bin/
View Trident CLI plugin help
You can use the built-in plugin help features to get detailed help on the capabilities of the plugin:
-
Use the help function to view usage guidance:
tridentctl protect help
Enable command auto-completion
After you have installed the Trident protect CLI plugin, you can enable auto-completion for certain commands.
-
Download the completion script:
curl -L -O https://github.com/NetApp/tridentctl-protect/releases/download/24.10.0/tridentctl-completion.bash
-
Make a new directory in your home directory to contain the script:
mkdir -p ~/.bash/completions
-
Move the downloaded script to the
~/.bash/completions
directory:mv tridentctl-completion.bash ~/.bash/completions/
-
Add the following line to the
~/.bashrc
file in your home directory:source ~/.bash/completions/tridentctl-completion.bash
-
Download the completion script:
curl -L -O https://github.com/NetApp/tridentctl-protect/releases/download/24.10.0/tridentctl-completion.zsh
-
Make a new directory in your home directory to contain the script:
mkdir -p ~/.zsh/completions
-
Move the downloaded script to the
~/.zsh/completions
directory:mv tridentctl-completion.zsh ~/.zsh/completions/
-
Add the following line to the
~/.zprofile
file in your home directory:source ~/.zsh/completions/tridentctl-completion.zsh
Upon your next shell login, you can use command auto-completion with the tridentctl protect plugin.