Trident Protect CLIプラグインをインストールする
Tridentの拡張機能であるTrident Protectコマンドラインプラグインを使用することができます。 tridentctl Trident保護カスタム リソース (CR) を作成し、操作するためのユーティリティです。
Trident Protect CLIプラグインをインストールする
コマンドライン ユーティリティを使用する前に、クラスターにアクセスするために使用するマシンにそれをインストールする必要があります。マシンが x64 またはARM CPU を使用しているかどうかに応じて、次の手順に従ってください。
-
Trident protect CLI プラグインをダウンロードします。
curl -L -o tridentctl-protect https://github.com/NetApp/tridentctl-protect/releases/download/25.06.0/tridentctl-protect-linux-amd64
-
Trident protect CLI プラグインをダウンロードします。
curl -L -o tridentctl-protect https://github.com/NetApp/tridentctl-protect/releases/download/25.06.0/tridentctl-protect-linux-arm64
-
Trident protect CLI プラグインをダウンロードします。
curl -L -o tridentctl-protect https://github.com/NetApp/tridentctl-protect/releases/download/25.06.0/tridentctl-protect-macos-amd64
-
Trident protect CLI プラグインをダウンロードします。
curl -L -o tridentctl-protect https://github.com/NetApp/tridentctl-protect/releases/download/25.06.0/tridentctl-protect-macos-arm64
-
プラグインバイナリの実行権限を有効にします。
chmod +x tridentctl-protect -
プラグインのバイナリを PATH 変数で定義されている場所にコピーします。例えば、
/usr/bin`または `/usr/local/bin(昇格した権限が必要になる場合があります):cp ./tridentctl-protect /usr/local/bin/ -
オプションで、プラグインのバイナリをホームディレクトリ内の場所にコピーすることもできます。この場合、場所が PATH 変数の一部であることを確認することをお勧めします。
cp ./tridentctl-protect ~/bin/
|
|
プラグインをPATH変数の場所にコピーすると、次のように入力してプラグインを使用できるようになります。 `tridentctl-protect`または `tridentctl protect`どこからでも。 |
Trident CLI プラグインのヘルプを表示
プラグインの機能に関する詳細なヘルプを取得するには、組み込みのプラグイン ヘルプ機能を使用できます。
-
ヘルプ機能を使用して使用方法のガイダンスを表示します。
tridentctl-protect help
コマンドの自動補完を有効にする
Trident protect CLI プラグインをインストールした後、特定のコマンドの自動補完を有効にすることができます。
-
完了スクリプトをダウンロードします:
curl -L -O https://github.com/NetApp/tridentctl-protect/releases/download/25.06.0/tridentctl-completion.bash -
スクリプトを格納するための新しいディレクトリをホーム ディレクトリに作成します。
mkdir -p ~/.bash/completions -
ダウンロードしたスクリプトを `~/.bash/completions`ディレクトリ:
mv tridentctl-completion.bash ~/.bash/completions/ -
次の行を `~/.bashrc`ホームディレクトリ内のファイル:
source ~/.bash/completions/tridentctl-completion.bash
-
完了スクリプトをダウンロードします:
curl -L -O https://github.com/NetApp/tridentctl-protect/releases/download/25.06.0/tridentctl-completion.zsh -
スクリプトを格納するための新しいディレクトリをホーム ディレクトリに作成します。
mkdir -p ~/.zsh/completions -
ダウンロードしたスクリプトを `~/.zsh/completions`ディレクトリ:
mv tridentctl-completion.zsh ~/.zsh/completions/ -
次の行を `~/.zprofile`ホームディレクトリ内のファイル:
source ~/.zsh/completions/tridentctl-completion.zsh
次回のシェルログイン時には、tridentctl-protect プラグインによるコマンドの自動補完を使用できます。