Skip to content

Commit aa6bece

Browse files
committed
OSDOCS-4300: Docs for using Krew to manage plug-ins
1 parent c88c562 commit aa6bece

File tree

5 files changed

+129
-3
lines changed

5 files changed

+129
-3
lines changed

_topic_maps/_topic_map.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,18 +681,20 @@ Topics:
681681
File: getting-started-cli
682682
- Name: Configuring the OpenShift CLI
683683
File: configuring-cli
684+
- Name: Usage of oc and kubectl commands
685+
File: usage-oc-kubectl
684686
- Name: Managing CLI profiles
685687
File: managing-cli-profiles
686688
- Name: Extending the OpenShift CLI with plug-ins
687689
File: extending-cli-plugins
690+
- Name: Managing CLI plug-ins with Krew
691+
File: managing-cli-plugins-krew
688692
Distros: openshift-enterprise,openshift-origin
689693
- Name: OpenShift CLI developer command reference
690694
File: developer-cli-commands
691695
- Name: OpenShift CLI administrator command reference
692696
File: administrator-cli-commands
693697
Distros: openshift-enterprise,openshift-origin
694-
- Name: Usage of oc and kubectl commands
695-
File: usage-oc-kubectl
696698
- Name: Developer CLI (odo)
697699
Dir: developer_cli_odo
698700
Distros: openshift-enterprise,openshift-origin,openshift-online
@@ -1077,7 +1079,7 @@ Topics:
10771079
- Name: Installing the AWS Load Balancer Operator
10781080
File: install-aws-load-balancer-operator
10791081
- Name: Installing the AWS Load Balancer Operator on Secure Token Service cluster
1080-
File: installing-albo-sts-cluster
1082+
File: installing-albo-sts-cluster
10811083
- Name: Creating an instance of the AWS Load Balancer Controller
10821084
File: create-instance-aws-load-balancer-controller
10831085
- Name: Serving Multiple Ingresses through a single AWS Load Balancer
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)