Sometimes in production, but most likely in testing environments, you might want to remove the domain home that is generated using the create-domain.sh
script.
Run the following command to delete the domain:
$ cd $WORKDIR/kubernetes/delete-domain
$ ./delete-weblogic-domain-resources.sh -d <domain_uid>
For example:
$ cd $WORKDIR/kubernetes/delete-domain
$ ./delete-weblogic-domain-resources.sh -d governancedomain
Drop the RCU schemas as follows:
$ kubectl exec -it helper -n <domain_namespace> -- /bin/bash
[oracle@helper ~]$
[oracle@helper ~]$ export CONNECTION_STRING=<db_host.domain>:<db_port>/<service_name>
[oracle@helper ~]$ export RCUPREFIX=<rcu_schema_prefix>
/u01/oracle/oracle_common/bin/rcu -silent -dropRepository -databaseType ORACLE -connectString $CONNECTION_STRING \
-dbUser sys -dbRole sysdba -selectDependentsForComponents true -schemaPrefix $RCUPREFIX \
-component MDS -component IAU -component IAU_APPEND -component IAU_VIEWER -component OPSS \
-component WLS -component STB -component OIM -component SOAINFRA -component UCSUMS -f < /tmp/pwd.txt
For example:
$ kubectl exec -it helper -n oigns -- /bin/bash
[oracle@helper ~]$ export CONNECTION_STRING=mydatabasehost.example.com:1521/orcl.example.com
[oracle@helper ~]$ export RCUPREFIX=OIGK8S
/u01/oracle/oracle_common/bin/rcu -silent -dropRepository -databaseType ORACLE -connectString $CONNECTION_STRING \
-dbUser sys -dbRole sysdba -selectDependentsForComponents true -schemaPrefix $RCUPREFIX \
-component MDS -component IAU -component IAU_APPEND -component IAU_VIEWER -component OPSS \
-component WLS -component STB -component OIM -component SOAINFRA -component UCSUMS -f < /tmp/pwd.txt
Delete the contents of the persistent volume:
$ rm -rf <persistent_volume>/governancedomainpv/*
For example:
$ rm -rf /scratch/shared/governancedomainpv/*
Delete the WebLogic Kubernetes Operator, by running the following command:
$ helm delete weblogic-kubernetes-operator -n opns
Delete the label from the OIG namespace:
$ kubectl label namespaces <domain_namespace> weblogic-operator-
For example:
$ kubectl label namespaces oigns weblogic-operator-
Delete the service account for the operator:
$ kubectl delete serviceaccount <sample-kubernetes-operator-sa> -n <domain_namespace>
For example:
$ kubectl delete serviceaccount op-sa -n opns
Delete the operator namespace:
$ kubectl delete namespace <sample-kubernetes-operator-ns>
For example:
$ kubectl delete namespace opns
To delete NGINX:
$ helm delete governancedomain-nginx-designconsole -n <domain_namespace>
For example:
$ helm delete governancedomain-nginx-designconsole -n oigns
Then run:
$ helm delete governancedomain-nginx -n <domain_namespace>
For example:
$ helm delete governancedomain-nginx -n oigns
Then run:
$ helm delete nginx-ingress -n <domain_namespace>
For example:
$ helm delete nginx-ingress -n nginxssl
Then delete the NGINX namespace:
$ kubectl delete namespace <namespace>
For example:
$ kubectl delete namespace nginxssl
Delete the OIG namespace:
$ kubectl delete namespace <domain_namespace>
For example:
$ kubectl delete namespace oigns