1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

OSDOCS-4300: Docs for using Krew to manage plug-ins

This commit is contained in:
Andrea Hoffer
2022-12-01 10:31:59 -05:00
committed by openshift-cherrypick-robot
parent 690efba843
commit 60cfb050eb
5 changed files with 128 additions and 2 deletions

View File

@@ -682,18 +682,20 @@ Topics:
File: getting-started-cli
- Name: Configuring the OpenShift CLI
File: configuring-cli
- Name: Usage of oc and kubectl commands
File: usage-oc-kubectl
- Name: Managing CLI profiles
File: managing-cli-profiles
- Name: Extending the OpenShift CLI with plug-ins
File: extending-cli-plugins
- Name: Managing CLI plug-ins with Krew
File: managing-cli-plugins-krew
Distros: openshift-enterprise,openshift-origin
- Name: OpenShift CLI developer command reference
File: developer-cli-commands
- Name: OpenShift CLI administrator command reference
File: administrator-cli-commands
Distros: openshift-enterprise,openshift-origin
- Name: Usage of oc and kubectl commands
File: usage-oc-kubectl
- Name: Developer CLI (odo)
Dir: developer_cli_odo
Distros: openshift-enterprise,openshift-origin,openshift-online

View File

@@ -0,0 +1,28 @@
:_content-type: ASSEMBLY
[id="managing-cli-plugin-krew"]
= Managing CLI plug-ins with Krew
include::_attributes/common-attributes.adoc[]
:context: managing-cli-plugins-krew
toc::[]
You can use Krew to install and manage plug-ins for the OpenShift CLI (`oc`).
:FeatureName: Using Krew to install and manage plug-ins for the OpenShift CLI
include::snippets/technology-preview.adoc[]
// Installing a CLI plug-in with Krew
include::modules/cli-krew-install-plugin.adoc[leveloffset=+1]
// Updating a CLI plug-in with Krew
include::modules/cli-krew-update-plugin.adoc[leveloffset=+1]
// Removing a CLI plug-in with Krew
include::modules/cli-krew-remove-plugin.adoc[leveloffset=+1]
[role="_additional-resources"]
[id="additional-resources_managing-cli-plugins-krew"]
== Additional resources
* link:https://krew.sigs.k8s.io/[Krew]
* xref:../../cli_reference/openshift_cli/extending-cli-plugins.adoc#cli-extend-plugins[Extending the OpenShift CLI with plug-ins]

View File

@@ -0,0 +1,43 @@
// Module included in the following assemblies:
//
// * cli_reference/openshift_cli/installing-cli-plugins-krew.adoc
:_content-type: PROCEDURE
[id="cli-krew-install-plugin_{context}"]
= Installing a CLI plug-in with Krew
You can install a plug-in for the OpenShift CLI (`oc`) with Krew.
.Prerequisites
* You have installed Krew by following the link:https://krew.sigs.k8s.io/docs/user-guide/setup/install/[installation procedure] in the Krew documentation.
.Procedure
. To list all available plug-ins, run the following command:
+
[source,terminal]
----
$ oc krew search
----
. To get information about a plug-in, run the following command:
+
[source,terminal]
----
$ oc krew info <plugin_name>
----
. To install a plug-in, run the following command:
+
[source,terminal]
----
$ oc krew install <plugin_name>
----
. To list all plug-ins that were installed by Krew, run the following command:
+
[source,terminal]
----
$ oc krew list
----

View File

@@ -0,0 +1,23 @@
// Module included in the following assemblies:
//
// * cli_reference/openshift_cli/installing-cli-plugins-krew.adoc
:_content-type: PROCEDURE
[id="cli-krew-remove-plugin_{context}"]
= Uninstalling a CLI plug-in with Krew
You can uninstall a plug-in that was installed for the OpenShift CLI (`oc`) with Krew.
.Prerequisites
* You have installed Krew by following the link:https://krew.sigs.k8s.io/docs/user-guide/setup/install/[installation procedure] in the Krew documentation.
* You have installed a plug-in for the OpenShift CLI with Krew.
.Procedure
* To uninstall a plug-in, run the following command:
+
[source,terminal]
----
$ oc krew uninstall <plugin_name>
----

View File

@@ -0,0 +1,30 @@
// Module included in the following assemblies:
//
// * cli_reference/openshift_cli/installing-cli-plugins-krew.adoc
:_content-type: PROCEDURE
[id="cli-krew-update-plugin_{context}"]
= Updating a CLI plug-in with Krew
You can update a plug-in that was installed for the OpenShift CLI (`oc`) with Krew.
.Prerequisites
* You have installed Krew by following the link:https://krew.sigs.k8s.io/docs/user-guide/setup/install/[installation procedure] in the Krew documentation.
* You have installed a plug-in for the OpenShift CLI with Krew.
.Procedure
* To update a single plug-in, run the following command:
+
[source,terminal]
----
$ oc krew upgrade <plugin_name>
----
* To update all plug-ins that were installed by Krew, run the following command:
+
[source,terminal]
----
$ oc krew upgrade
----