Why can ServiceInstances not be deleted when their ClusterServiceClass has been deleted?

3/28/2019

I am trying to delete "Provisioned Services" or rather ServiceInstances in OpenShift 3.11. Because of a Problem with 2 ClusterSerivceClasses with the same name I had to delete the old ClusterServiceClass. Unfortunately, the ClusterServiceClass still had some ServiceInstances. Now I cannot delete these ServiceInstances they are only "marked for deletion". Why can't I delete these ServiceInstances?

I have already tried to delete the ServiceInstances using the oc utility but this way also did not work.

-- Markus Kofler
kubernetes
openshift

1 Answer

3/28/2019

After some research with a collegue I found out that the ServiceInstance has a finalizer. Unfortunately, the finalizer is normally removed by the ClusterServiceClass. In order to delete the ServiceInstance the finalizer needs to be removed manually using oc edit

Finalizer:

metadata:
  finalizers:
  - kubernetes-incubator/service-catalog
-- Markus Kofler
Source: StackOverflow