Skip to content
Merged
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
91 changes: 15 additions & 76 deletions modules/nodes-pods-vertical-autoscaler-uninstall.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ You can remove the Vertical Pod Autoscaler Operator (VPA) from your {product-tit

[NOTE]
====
You can remove a specific VPA using the `oc delete vpa <vpa-name>` command. The same actions apply for resource requests as uninstalling the vertical pod autoscaler.
You can remove a specific VPA CR by using the `oc delete vpa <vpa-name>` command. The same actions apply for resource requests as uninstalling the vertical pod autoscaler.
====

After removing the VPA Operator, it is recommended that you remove other components associated with the Operator to avoid potential issues.
After removing the VPA Operator, it is recommended that you remove the other components associated with the Operator to avoid potential issues.

.Prerequisites

Expand All @@ -25,110 +25,49 @@ After removing the VPA Operator, it is recommended that you remove other compone

. Switch to the *openshift-vertical-pod-autoscaler* project.

. Find the *VerticalPodAutoscaler* Operator and click the Options menu. Select *Uninstall Operator*.
. For the *VerticalPodAutoscaler* Operator, click the Options menu {kebab} and select *Uninstall Operator*.

. Optional: To remove all operands associated with the Operator, in the dialog box, select *Delete all operand instances for this operator* checkbox.

. Click *Uninstall*.

. Optional: Use the OpenShift CLI to remove the VPA components:

.. Delete the VPA mutating webhook configuration:
.. Delete the VPA namespace:
+
[source,terminal]
----
$ oc delete mutatingwebhookconfigurations/vpa-webhook-config
$ oc delete namespace openshift-vertical-pod-autoscaler
----

.. List any VPA custom resources:
.. Delete the VPA custom resource definition (CRD) objects:
+
[source,terminal]
----
$ oc get verticalpodautoscalercheckpoints.autoscaling.k8s.io,verticalpodautoscalercontrollers.autoscaling.openshift.io,verticalpodautoscalers.autoscaling.k8s.io -o wide --all-namespaces
$ oc delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io
----
+
.Example output
[source,terminal]
----
NAMESPACE NAME AGE
my-project verticalpodautoscalercheckpoint.autoscaling.k8s.io/vpa-recommender-httpd 5m46s

NAMESPACE NAME AGE
openshift-vertical-pod-autoscaler verticalpodautoscalercontroller.autoscaling.openshift.io/default 11m

NAMESPACE NAME MODE CPU MEM PROVIDED AGE
my-project verticalpodautoscaler.autoscaling.k8s.io/vpa-recommender Auto 93m 262144k True 9m15s
----

.. Delete the listed VPA custom resources. For example:
+
[source,terminal]
----
$ oc delete verticalpodautoscalercheckpoint.autoscaling.k8s.io/vpa-recommender-httpd -n my-project
----
+
[source,terminal]
----
$ oc delete verticalpodautoscalercontroller.autoscaling.openshift.io/default -n openshift-vertical-pod-autoscaler
----
+
[source,terminal]
----
$ oc delete verticalpodautoscaler.autoscaling.k8s.io/vpa-recommender -n my-project
----

.. List any VPA custom resource definitions (CRDs):
+
[source,terminal]
----
$ oc get crd
----
+
.Example output
[source,terminal]
----
NAME CREATED AT
...
verticalpodautoscalercheckpoints.autoscaling.k8s.io 2022-02-07T14:09:20Z
verticalpodautoscalercontrollers.autoscaling.openshift.io 2022-02-07T14:09:20Z
verticalpodautoscalers.autoscaling.k8s.io 2022-02-07T14:09:20Z
...
$ oc delete crd verticalpodautoscalercontrollers.autoscaling.openshift.io
----

.. Delete the listed VPA CRDs:
+
[source,terminal]
----
$ oc delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io verticalpodautoscalercontrollers.autoscaling.openshift.io verticalpodautoscalers.autoscaling.k8s.io
$ oc delete crd verticalpodautoscalers.autoscaling.k8s.io
----
+
Deleting the CRDs removes the associated roles, cluster roles, and role bindings. However, there might be a few cluster roles that must be manually deleted.

.. List any VPA cluster roles:
Deleting the CRDs removes the associated roles, cluster roles, and role bindings.
+
[source,terminal]
----
$ oc get clusterrole | grep openshift-vertical-pod-autoscaler
----
+
.Example output
[source,terminal]
----
openshift-vertical-pod-autoscaler-6896f-admin 2022-02-02T15:29:55Z
openshift-vertical-pod-autoscaler-6896f-edit 2022-02-02T15:29:55Z
openshift-vertical-pod-autoscaler-6896f-view 2022-02-02T15:29:55Z
----

.. Delete the listed VPA cluster roles. For example:
+
[source,terminal]
----
$ oc delete clusterrole openshift-vertical-pod-autoscaler-6896f-admin openshift-vertical-pod-autoscaler-6896f-edit openshift-vertical-pod-autoscaler-6896f-view
----
[NOTE]
====
This action removes from the cluster all user-created VPA CRs. If you re-install the VPA, you must create these objects again.
====

.. Delete the VPA Operator:
+
[source,terminal]
----
$ oc delete operator/vertical-pod-autoscaler.openshift-vertical-pod-autoscaler
----