diff --git a/_topic_maps/_topic_map.yml b/_topic_maps/_topic_map.yml index 4587ee6db8..7b69e70a82 100644 --- a/_topic_maps/_topic_map.yml +++ b/_topic_maps/_topic_map.yml @@ -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 diff --git a/cli_reference/openshift_cli/managing-cli-plugins-krew.adoc b/cli_reference/openshift_cli/managing-cli-plugins-krew.adoc new file mode 100644 index 0000000000..4569547b0d --- /dev/null +++ b/cli_reference/openshift_cli/managing-cli-plugins-krew.adoc @@ -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] diff --git a/modules/cli-krew-install-plugin.adoc b/modules/cli-krew-install-plugin.adoc new file mode 100644 index 0000000000..bff8cd4310 --- /dev/null +++ b/modules/cli-krew-install-plugin.adoc @@ -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 +---- + +. To install a plug-in, run the following command: ++ +[source,terminal] +---- +$ oc krew install +---- + +. To list all plug-ins that were installed by Krew, run the following command: ++ +[source,terminal] +---- +$ oc krew list +---- diff --git a/modules/cli-krew-remove-plugin.adoc b/modules/cli-krew-remove-plugin.adoc new file mode 100644 index 0000000000..22ba9f133a --- /dev/null +++ b/modules/cli-krew-remove-plugin.adoc @@ -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 +---- diff --git a/modules/cli-krew-update-plugin.adoc b/modules/cli-krew-update-plugin.adoc new file mode 100644 index 0000000000..e4e86db64a --- /dev/null +++ b/modules/cli-krew-update-plugin.adoc @@ -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 +---- + +* To update all plug-ins that were installed by Krew, run the following command: ++ +[source,terminal] +---- +$ oc krew upgrade +----