Unbinding workloads

For the binding.operators.coreos.com/v1alpha1 API:

You can unbind a workload from a backing service by using the kubectl or oc command line tool.

Procedure
  • To unbind a workload from a backing service, delete the ServiceBinding custom resource (CR) linked to it:

    $ kubectl delete ServiceBinding <.metadata.name>

    OR

    $ oc delete ServiceBinding <.metadata.name>

    where <.metadata.name> is the name of the ServiceBinding resource.

    Examples
    $ kubectl delete ServiceBinding spring-petclinic-pgcluster
    $ oc delete ServiceBinding spring-petclinic-pgcluster

    where:

    spring-petclinic-pgcluster

    Specifies the name of the ServiceBinding CR.

For the servicebinding.io/v1alpha3 API:

You can unbind a workload from a backing service bound using a ServiceBinding custom resource (CR) from the servicebinding.io/v1alpha3 API:

Procedure
  • To unbind a workload from a backing service, delete the ServiceBinding custom resource (CR) linked to it:

    $ kubectl delete servicebindings.servicebinding.io <.metadata.name>

    OR

    $ oc delete servicebindings.servicebinding.io <.metadata.name>
    Examples
    $ kubectl delete servicebindings.servicebinding.io spring-petclinic-pgcluster
    $ oc delete servicebindings.servicebinding.io spring-petclinic-pgcluster

    where:

    spring-petclinic-pgcluster

    Specifies the name of the ServiceBinding CR.