3.3.3. Adding a plugin to the CLI Manager Operator
You can add a CLI plugin to the CLI Manager Operator by creating a new plugin resource in the OpenShift Container Platform web console’s YAML view.
Prerequisites
-
You are logged in to OpenShift Container Platform as a user with the
cluster-adminrole. - The CLI Manager Operator is installed.
Procedure
- Log in to the OpenShift Container Platform web console.
-
Navigate to Ecosystem
Installed Operators. - From the list, select CLI Manager Operator.
- Select the CLI Plugin tab.
- Click Create Plugin.
In the text box, enter the information for the plugin you are installing. See the following example YAML file.
Example YAML file to add a plugin
apiVersion: config.openshift.io/v1alpha1 kind: Plugin metadata: name: <plugin_name> spec: description: <description_of_plugin> homepage: <plugin_homepage> platforms: - bin: files: - from: <plugin_file_path> to: . image: <plugin_image> imagePullSecret: platform: <platform> shortDescription: <short_description_of_plugin> version: <version>where:
<plugin_name>- Specifies the name of the plugin you plan to use in commands.
bin- Specifies the path to the plugin executable.
imagePullSecret- Optional field if the registry is not public to add a pull secret to access your plugin image.
<platform>-
Add the architecture for your system; for example,
linux/amd64,darwin/arm64,windows/amd64, or another architecture. <version>- The version must be in v0.0.0 format.
- Click Save.
Verification
- Enter the following command to see if the plugin is listed and has been added successfully:
$ oc get plugin/<plugin_name> -o yaml
- Example output:
<plugin_name> ready to be served.