3.3.2. Adding the CLI Manager Operator custom index to Krew
You can use the terminal to add the CLI Manager Operator custom index to Krew so that the CLI Manager Operator will work in disconnected environments. This procedure is required for the CLI Manager Operator to function correctly and needs to be done only once.
If you use self-signed certificates, mark the certificate as trusted on your local operating system to use Krew.
Prerequisites
- Krew is installed.
- The CLI Manager Operator is installed.
Procedure
To establish the
ROUTEvariable, enter the following command:$ ROUTE=$(oc get route/openshift-cli-manager -n openshift-cli-manager-operator -o=jsonpath='{.spec.host}')To add the custom index to Krew, enter the following command:
$ oc krew index add <custom_index_name> https://$ROUTE/cli-managerTo update Krew, enter the following command and check for any errors:
$ oc krew updateExample output
Updated the local copy of plugin index. Updated the local copy of plugin index <custom_index_name>. New plugins available: * ocp/<plugin_name>