Skip to content

Commit 70d9be2

Browse files
committed
OSDOCS-13230: Documenting uninstalling the K8S NMState Operator
1 parent 968aad3 commit 70d9be2

File tree

4 files changed

+96
-2
lines changed

4 files changed

+96
-2
lines changed

modules/k8s-nmstate-deploying-nmstate-CLI.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="installing-the-kubernetes-nmstate-operator-CLI_{context}"]
7-
= Installing the Kubernetes NMState Operator using the CLI
7+
= Installing the Kubernetes NMState Operator by using the CLI
88

99
You can install the Kubernetes NMState Operator by using the OpenShift CLI (`oc)`. After it is installed, the Operator can deploy the NMState State Controller as a daemon set across all of the cluster nodes.
1010

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// Module included in the following assemblies:
2+
//
3+
// networking/k8s_nmstate/k8s-nmstate-about-the-kubernetes-nmstate-operator.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="k8s-nmstate-uninstall-operator_{context}"]
7+
= Uninstalling the Kubernetes NMState Operator
8+
9+
You can use the {olm-first} to uninstall the Kubernetes NMState Operator, but by design {olm} does not delete any associated custom resource definitions (CRDs), custom resources (CRs), or API Services.
10+
11+
Before you uninstall the Kubernetes NMState Operator from the `Subcription` resource used by {olm}, identify what Kubernetes NMState Operator resources to delete. This identification ensures that you can delete resources without impacting your running cluster.
12+
13+
If you need to reinstall the Kubernetes NMState Operator, see "Installing the Kubernetes NMState Operator by using the CLI" or "Installing the Kubernetes NMState Operator by using the web console".
14+
15+
.Prerequisites
16+
17+
* You have installed the {oc-first}.
18+
* You are logged in as a user with `cluster-admin` privileges.
19+
20+
.Procedure
21+
22+
. Unsubscribe the Kubernetes NMState Operator from the `Subcription` resource by running the following command:
23+
+
24+
[source,terminal]
25+
----
26+
$ oc delete --namespace openshift-nmstate subscription kubernetes-nmstate-operator
27+
----
28+
29+
. Find the `ClusterServiceVersion` (CSV) resource that associates with the Kubernetes NMState Operator:
30+
+
31+
[source,terminal]
32+
----
33+
$ oc get --namespace openshift-nmstate clusterserviceversion
34+
----
35+
+
36+
.Example output that lists a CSV resource
37+
[source,terminal]
38+
----
39+
NAME DISPLAY VERSION REPLACES PHASE
40+
kubernetes-nmstate-operator.v4.18.0 Kubernetes NMState Operator 4.18.0 Succeeded
41+
----
42+
43+
. Delete the CSV resource. After you delete the file, {olm} deletes certain resources, such as `RBAC`, that it created for the Operator.
44+
+
45+
[source,terminal]
46+
----
47+
$ oc delete --namespace openshift-nmstate clusterserviceversion kubernetes-nmstate-operator.v4.18.0
48+
----
49+
50+
. Delete the `nmstate` CR and any associated `Deployment` resources by running the following commands:
51+
+
52+
[source,terminal]
53+
----
54+
$ oc -n openshift-nmstate delete nmstate nmstate
55+
----
56+
+
57+
[source,terminal]
58+
----
59+
$ oc delete --all deployments --namespace=openshift-nmstate
60+
----
61+
62+
. Delete all the custom resource definition (CRD), such as `nmstates`, that exist in the `nmstate.io` namespace by running the following commands:
63+
+
64+
[source,terminal]
65+
----
66+
$ oc delete crd nmstates.nmstate.io
67+
----
68+
+
69+
[source,terminal]
70+
----
71+
$ oc delete crd nodenetworkconfigurationenactments.nmstate.io
72+
----
73+
+
74+
[source,terminal]
75+
----
76+
$ oc delete crd nodenetworkstates.nmstate.io
77+
----
78+
+
79+
[source,terminal]
80+
----
81+
$ oc delete crd nodenetworkconfigurationpolicies.nmstate.io
82+
----
83+
84+
. Delete the namespace:
85+
+
86+
[source,terminal]
87+
----
88+
$ oc delete namespace kubernetes-nmstate
89+
----
90+

networking/networking_operators/k8s-nmstate-about-the-k8s-nmstate-operator.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ You can install the Kubernetes NMState Operator by using the web console or the
4141
// Installing the Kubernetes NMState Operator by using the web console
4242
include::modules/k8s-nmstate-installing-the-kubernetes-nmstate-operator.adoc[leveloffset=+2]
4343

44-
// Installing the Kubernetes NMState Operator using the CLI
44+
// Installing the Kubernetes NMState Operator by using the CLI
4545
include::modules/k8s-nmstate-deploying-nmstate-CLI.adoc[leveloffset=+2]
4646

4747
// Viewing statistics collected by the Kubernetes NMState Operator
4848
include::modules/viewing-stats-collected-kubernetes-nmtate-op.adoc[leveloffset=+2]
4949

50+
// Uninstalling the Kubernetes NMState Operator
51+
include::modules/k8s-nmstate-uninstall-operator.adoc[leveloffset=+1]
52+
5053
[role="_additional-resources"]
5154
[id="additional-resources_k8s-nmstate-view-stats_{context}"]
5255
== Additional resources

operators/understanding/olm/olm-workflow.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ toc::[]
88

99
This guide outlines the workflow of Operator Lifecycle Manager (OLM) in {product-title}.
1010

11+
// Operator installation and upgrade workflow in OLM
1112
include::modules/olm-upgrades.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)