In this use case, an existing OCI OBDS system deployed earlier is terminated using Oracle DB Operator OBDS controller. Its a 2 Step operation.
In order to terminate an existing OBDS system, the steps will be:
- Bind the existing OBDS System to OBDS Controller.
- Apply the change to terminate this OBDS System.
NOTE We are assuming that before this step, you have followed the prerequisite steps to create the configmap and the secrets required during the deployment.
This example uses terminate_dbcs_system.yaml
to terminated a Single Instance OBDS VMDB using Oracle DB Operator OBDS Controller with:
- OCID of existing VMDB as
ocid1.dbsystem.oc1.phx.anyhqljrabf7htyanr3lnp6wtu5ld7qwszohiteodvwahonr2yymrftarkqa
- OCI Configmap as
oci-cred
- OCI Secret as
oci-privatekey
NOTE: For the details of the parameters to be used in the .yaml file, please refer here.
Use the file: terminate_dbcs_system.yaml for this use case as below:
- Deploy the .yaml file:
[root@test-server OBDS]# kubectl apply -f terminate_dbcs_system.yaml
dbcssystem.database.oracle.com/dbcssystem-terminate created
[root@test-server OBDS]# kubectl delete -f terminate_dbcs_system.yaml
dbcssystem.database.oracle.com "dbcssystem-terminate" deleted
- Check the logs of Oracle DB Operator Pod
pod/oracle-database-operator-controller-manager-665874bd57-g2cgw
for an update on the terminate operation been accepted.
[root@test-server OBDS]# kubectl logs -f pod/oracle-database-operator-controller-manager-665874bd57-g2cgw -n oracle-database-operator-system
- Check and confirm if the existing OCI OBDS system is NO longer available after sometime because of termination:
[root@test-server OBDS]# kubectl describe dbcssystems.database.oracle.com dbcssystem-terminate
Here is the sample output for terminating an existing OBDS System deployed in OCI using Oracle DB Operator OBDS Controller with minimal parameters.