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.

Steps
  1. Download the Trident protect CLI plugin:

    curl -L -o tridentctl-protect https://github.com/NetApp/tridentctl-protect/releases/download/25.02.0/tridentctl-protect-linux-amd64
    Console
  1. Enable execute permissions for the plugin binary:

    chmod +x tridentctl-protect
    Console
  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/
    Console
  3. Optionally, you can copy the plugin binary to a location in your home directory. In this case, it is recommended to ensure the location is part of your PATH variable:

    cp ./tridentctl-protect ~/bin/
    Console
Note Copying the plugin to a location in your PATH variable enables you to use the plugin by typing tridentctl-protect or tridentctl protect from any location.

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
    Console

Enable command auto-completion

After you have installed the Trident protect CLI plugin, you can enable auto-completion for certain commands.

Steps
  1. Download the completion script:

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

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

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

    source ~/.bash/completions/tridentctl-completion.bash
    Console
Result

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