Skip to main content

Install the Trident protect CLI plugin

Contributors netapp-mwallis

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 plugin for Linux AMD64 CPUs
  1. 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 plugin for Linux ARM64 CPUs
  1. 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 plugin for Mac AMD64 CPUs
  1. 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 plugin for Mac ARM64 CPUs
  1. 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
  1. Enable execute permissions for the binary:

    chmod +x tridentctl-protect
  2. 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/
  3. 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:

Steps
  1. 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.

Enable auto-completion for the Bash shell
  1. Download the completion script:

    curl -L -O https://github.com/NetApp/tridentctl-protect/releases/download/24.10.0/tridentctl-completion.bash
  2. Make a new directory in your home directory to contain the script:

    mkdir -p ~/.bash/completions
  3. Move the downloaded script to the ~/.bash/completions directory:

    mv tridentctl-completion.bash ~/.bash/completions/
  4. Add the following line to the ~/.bashrc file in your home directory:

    source ~/.bash/completions/tridentctl-completion.bash
Enable auto-completion for the Z shell
  1. Download the completion script:

    curl -L -O https://github.com/NetApp/tridentctl-protect/releases/download/24.10.0/tridentctl-completion.zsh
  2. Make a new directory in your home directory to contain the script:

    mkdir -p ~/.zsh/completions
  3. Move the downloaded script to the ~/.zsh/completions directory:

    mv tridentctl-completion.zsh ~/.zsh/completions/
  4. Add the following line to the ~/.zprofile file in your home directory:

    source ~/.zsh/completions/tridentctl-completion.zsh
Result

Upon your next shell login, you can use command auto-completion with the tridentctl protect plugin.