Chris G.
Chris G.

Reputation: 25964

how to remove operator-lifecycle-manager from operatorhub.io

I have installed an operator from operatorhub.io. Now how do you remove the operator lifecycle manager again?

Install:

curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.22.0/install.sh | bash -s v0.22.0

Delete:?

Upvotes: 1

Views: 356

Answers (2)

jimbo
jimbo

Reputation: 1

Try this

export OLM_RELEASE=v0.28.0
kubectl delete apiservices.apiregistration.k8s.io v1.packages.operators.coreos.com
kubectl delete -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/$OLM_RELEASE/crds.yaml
kubectl delete -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/$OLM_RELEASE/olm.yaml

Upvotes: 0

Galletti_Lance
Galletti_Lance

Reputation: 559

If you have the operator-sdk installed you can simply run

operator-sdk olm uninstall

Otherwise, taking a look at the OLM github repo's Makefile, you can follow these steps:

    - kubectl delete -f deploy/upstream/quickstart/crds.yaml
    - kubectl delete -f deploy/upstream/quickstart/olm.yaml
    - kubectl delete catalogsources.operators.coreos.com
    - kubectl delete clusterserviceversions.operators.coreos.com
    - kubectl delete installplans.operators.coreos.com
    - kubectl delete operatorgroups.operators.coreos.com subscriptions.operators.coreos.com
    - kubectl delete apiservices.apiregistration.k8s.io v1.packages.operators.coreos.com
    - kubectl delete ns olm
    - kubectl delete ns openshift-operator-lifecycle-manager
    - kubectl delete ns openshift-operators
    - kubectl delete ns operators
    - kubectl delete clusterrole.rbac.authorization.k8s.io/aggregate-olm-edit
    - kubectl delete clusterrole.rbac.authorization.k8s.io/aggregate-olm-view
    - kubectl delete clusterrole.rbac.authorization.k8s.io/system:controller:operator-lifecycle-manager
    - kubectl delete clusterroles.rbac.authorization.k8s.io "system:controller:operator-lifecycle-manager"
    - kubectl delete clusterrolebindings.rbac.authorization.k8s.io "olm-operator-binding-openshift-operator-lifecycle-manager"

Upvotes: 1

Related Questions