Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/k8s-nmstate-deploying-nmstate-CLI.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

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.

Expand Down
90 changes: 90 additions & 0 deletions modules/k8s-nmstate-uninstall-operator.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// Module included in the following assemblies:
//
// networking/k8s_nmstate/k8s-nmstate-about-the-kubernetes-nmstate-operator.adoc

:_mod-docs-content-type: PROCEDURE
[id="k8s-nmstate-uninstall-operator_{context}"]
= Uninstalling the Kubernetes NMState Operator

You can use the Operator Lifecycle Manager (OLM) 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.

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.

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".

.Prerequisites

* You have installed the {oc-first}.
* You are logged in as a user with `cluster-admin` privileges.

.Procedure

. Unsubscribe the Kubernetes NMState Operator from the `Subcription` resource by running the following command:
+
[source,terminal]
----
$ oc delete --namespace openshift-nmstate subscription kubernetes-nmstate-operator
----

. Find the `ClusterServiceVersion` (CSV) resource that associates with the Kubernetes NMState Operator:
+
[source,terminal]
----
$ oc get --namespace openshift-nmstate clusterserviceversion
----
+
.Example output that lists a CSV resource
[source,terminal]
----
NAME DISPLAY VERSION REPLACES PHASE
kubernetes-nmstate-operator.v4.18.0 Kubernetes NMState Operator 4.18.0 Succeeded
----

. Delete the CSV resource. After you delete the file, OLM deletes certain resources, such as `RBAC`, that it created for the Operator.
+
[source,terminal]
----
$ oc delete --namespace openshift-nmstate clusterserviceversion kubernetes-nmstate-operator.v4.18.0
----

. Delete the `nmstate` CR and any associated `Deployment` resources by running the following commands:
+
[source,terminal]
----
$ oc -n openshift-nmstate delete nmstate nmstate
----
+
[source,terminal]
----
$ oc delete --all deployments --namespace=openshift-nmstate
----

. Delete all the custom resource definition (CRD), such as `nmstates`, that exist in the `nmstate.io` namespace by running the following commands:
+
[source,terminal]
----
$ oc delete crd nmstates.nmstate.io
----
+
[source,terminal]
----
$ oc delete crd nodenetworkconfigurationenactments.nmstate.io
----
+
[source,terminal]
----
$ oc delete crd nodenetworkstates.nmstate.io
----
+
[source,terminal]
----
$ oc delete crd nodenetworkconfigurationpolicies.nmstate.io
----

. Delete the namespace:
+
[source,terminal]
----
$ oc delete namespace kubernetes-nmstate
----

Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ Node networking is monitored and updated by the following objects:
You can install the Kubernetes NMState Operator by using the web console or the CLI.

include::modules/k8s-nmstate-installing-the-kubernetes-nmstate-operator.adoc[leveloffset=+2]

include::modules/k8s-nmstate-deploying-nmstate-CLI.adoc[leveloffset=+2]

// Uninstalling the Kubernetes NMState Operator
include::modules/k8s-nmstate-uninstall-operator.adoc[leveloffset=+1]
1 change: 1 addition & 0 deletions operators/understanding/olm/olm-workflow.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ toc::[]

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

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