Skip to content

Commit c523c97

Browse files
authored
Merge pull request #53368 from bergerhoffer/OSDOCS-4300-krew
OSDOCS-4300: Docs for using Krew to manage plug-ins
2 parents 74f6e37 + aa6bece commit c523c97

File tree

5 files changed

+128
-2
lines changed

5 files changed

+128
-2
lines changed

_topic_maps/_topic_map.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,18 +683,20 @@ Topics:
683683
File: getting-started-cli
684684
- Name: Configuring the OpenShift CLI
685685
File: configuring-cli
686+
- Name: Usage of oc and kubectl commands
687+
File: usage-oc-kubectl
686688
- Name: Managing CLI profiles
687689
File: managing-cli-profiles
688690
- Name: Extending the OpenShift CLI with plug-ins
689691
File: extending-cli-plugins
692+
- Name: Managing CLI plug-ins with Krew
693+
File: managing-cli-plugins-krew
690694
Distros: openshift-enterprise,openshift-origin
691695
- Name: OpenShift CLI developer command reference
692696
File: developer-cli-commands
693697
- Name: OpenShift CLI administrator command reference
694698
File: administrator-cli-commands
695699
Distros: openshift-enterprise,openshift-origin
696-
- Name: Usage of oc and kubectl commands
697-
File: usage-oc-kubectl
698700
- Name: Developer CLI (odo)
699701
Dir: developer_cli_odo
700702
Distros: openshift-enterprise,openshift-origin,openshift-online
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
:_content-type: ASSEMBLY
2+
[id="managing-cli-plugin-krew"]
3+
= Managing CLI plug-ins with Krew
4+
include::_attributes/common-attributes.adoc[]
5+
:context: managing-cli-plugins-krew
6+
7+
toc::[]
8+
9+
You can use Krew to install and manage plug-ins for the OpenShift CLI (`oc`).
10+
11+
:FeatureName: Using Krew to install and manage plug-ins for the OpenShift CLI
12+
include::snippets/technology-preview.adoc[]
13+
14+
// Installing a CLI plug-in with Krew
15+
include::modules/cli-krew-install-plugin.adoc[leveloffset=+1]
16+
17+
// Updating a CLI plug-in with Krew
18+
include::modules/cli-krew-update-plugin.adoc[leveloffset=+1]
19+
20+
// Removing a CLI plug-in with Krew
21+
include::modules/cli-krew-remove-plugin.adoc[leveloffset=+1]
22+
23+
[role="_additional-resources"]
24+
[id="additional-resources_managing-cli-plugins-krew"]
25+
== Additional resources
26+
27+
* link:https://krew.sigs.k8s.io/[Krew]
28+
* xref:../../cli_reference/openshift_cli/extending-cli-plugins.adoc#cli-extend-plugins[Extending the OpenShift CLI with plug-ins]

modules/cli-krew-install-plugin.adoc

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * cli_reference/openshift_cli/installing-cli-plugins-krew.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="cli-krew-install-plugin_{context}"]
7+
= Installing a CLI plug-in with Krew
8+
9+
You can install a plug-in for the OpenShift CLI (`oc`) with Krew.
10+
11+
.Prerequisites
12+
13+
* You have installed Krew by following the link:https://krew.sigs.k8s.io/docs/user-guide/setup/install/[installation procedure] in the Krew documentation.
14+
15+
.Procedure
16+
17+
. To list all available plug-ins, run the following command:
18+
+
19+
[source,terminal]
20+
----
21+
$ oc krew search
22+
----
23+
24+
. To get information about a plug-in, run the following command:
25+
+
26+
[source,terminal]
27+
----
28+
$ oc krew info <plugin_name>
29+
----
30+
31+
. To install a plug-in, run the following command:
32+
+
33+
[source,terminal]
34+
----
35+
$ oc krew install <plugin_name>
36+
----
37+
38+
. To list all plug-ins that were installed by Krew, run the following command:
39+
+
40+
[source,terminal]
41+
----
42+
$ oc krew list
43+
----

modules/cli-krew-remove-plugin.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * cli_reference/openshift_cli/installing-cli-plugins-krew.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="cli-krew-remove-plugin_{context}"]
7+
= Uninstalling a CLI plug-in with Krew
8+
9+
You can uninstall a plug-in that was installed for the OpenShift CLI (`oc`) with Krew.
10+
11+
.Prerequisites
12+
13+
* You have installed Krew by following the link:https://krew.sigs.k8s.io/docs/user-guide/setup/install/[installation procedure] in the Krew documentation.
14+
* You have installed a plug-in for the OpenShift CLI with Krew.
15+
16+
.Procedure
17+
18+
* To uninstall a plug-in, run the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ oc krew uninstall <plugin_name>
23+
----

modules/cli-krew-update-plugin.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * cli_reference/openshift_cli/installing-cli-plugins-krew.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="cli-krew-update-plugin_{context}"]
7+
= Updating a CLI plug-in with Krew
8+
9+
You can update a plug-in that was installed for the OpenShift CLI (`oc`) with Krew.
10+
11+
.Prerequisites
12+
13+
* You have installed Krew by following the link:https://krew.sigs.k8s.io/docs/user-guide/setup/install/[installation procedure] in the Krew documentation.
14+
* You have installed a plug-in for the OpenShift CLI with Krew.
15+
16+
.Procedure
17+
18+
* To update a single plug-in, run the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ oc krew upgrade <plugin_name>
23+
----
24+
25+
* To update all plug-ins that were installed by Krew, run the following command:
26+
+
27+
[source,terminal]
28+
----
29+
$ oc krew upgrade
30+
----

0 commit comments

Comments
 (0)