This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.2.5.5. 卸载 Vertical Pod Autoscaler Operator
您可以从 OpenShift Container Platform 集群中删除 Vertical Pod Autoscaler Operator(VPA)。卸载后,已由现有 VPA CR 修改的 pod 的资源请求不会改变。任何新 pod 都会根据工作负载对象中的定义获得资源,而不是之前由 VPA 提供的的建议。
您可以使用 oc delete vpa <vpa-name>
; 命令删除特定的 VPA CR。在卸载垂直 pod 自动扩展时,同样的操作适用于资源请求。
删除 VPA Operator 后,建议您删除与 Operator 关联的其他组件,以避免潜在的问题。
先决条件
- 已安装 Vertical Pod Autoscaler Operator。
流程
-
在 OpenShift Container Platform web 控制台中,点击 Operators
Installed Operators。 - 切换到 openshift-vertical-pod-autoscaler 项目。
-
对于 VerticalPodAutoscaler Operator,点 Options 菜单
并选择 Uninstall Operator。
- 可选: 要删除与 Operator 关联的所有操作对象,请在对话框中选择 Delete all operand instance for this operator 复选框。
- 点击 Uninstall。
可选: 使用 OpenShift CLI 删除 VPA 组件:
删除 VPA 命名空间:
oc delete namespace openshift-vertical-pod-autoscaler
$ oc delete namespace openshift-vertical-pod-autoscaler
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 删除 VPA 自定义资源定义(CRD)对象:
oc delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io
$ oc delete crd verticalpodautoscalercheckpoints.autoscaling.k8s.io
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc delete crd verticalpodautoscalercontrollers.autoscaling.openshift.io
$ oc delete crd verticalpodautoscalercontrollers.autoscaling.openshift.io
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc delete crd verticalpodautoscalers.autoscaling.k8s.io
$ oc delete crd verticalpodautoscalers.autoscaling.k8s.io
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 删除 CRD 会删除关联的角色、集群角色和角色绑定。
注意此操作会从集群中移除,集群中的所有用户创建的 VPA CR。如果重新安装 VPA,您必须再次创建这些对象。
删除 VPA Operator:
oc delete operator/vertical-pod-autoscaler.openshift-vertical-pod-autoscaler
$ oc delete operator/vertical-pod-autoscaler.openshift-vertical-pod-autoscaler
Copy to Clipboard Copied! Toggle word wrap Toggle overflow