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 jobs, domain, and configmaps:
$ kubectl delete jobs <domain_job> -n <domain_namespace>
$ kubectl delete domain <domain_uid> -n <domain_namespace>
$ kubectl delete configmaps <domain_job>-cm -n <domain_namespace>
For example:
$ kubectl delete jobs governancedomain-create-fmw-infra-sample-domain-job -n oigns
$ kubectl delete domain governancedomain -n oigns
$ kubectl delete configmaps governancedomain-create-fmw-infra-sample-domain-job-cm -n oigns
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 Persistent Volume and Persistent Volume Claim:
$ kubectl delete pv <pv-name> -n <domain_namespace>
$ kubectl delete pvc <pvc-name> -n <domain_namespace>
For example:
$ kubectl delete pv governancedomain-domain-pv -n oigns
$ kubectl delete pvc governancedomain-domain-pvc -n oigns
Delete the contents of the persistent volume, for example:
$ rm -rf /<work directory>/governancedomainpv/*
For example:
$ rm -rf /scratch/OIGDockerK8S/governancedomainpv/*
Delete the WebLogic Kubernetes Operator, by running the following command:
$ helm delete weblogic-kubernetes-operator -n opns
To delete NGINX:
$ helm delete governancedomain-nginx -n oigns
$ helm delete nginx-ingress -n nginx
$ kubectl delete namespace nginx
or if using SSL:
$ helm delete governancedomain-nginx -n oigns
$ helm delete nginx-ingress -n nginxssl
$ kubectl delete namespace nginxssl
To delete Voyager:
$ helm delete governancedomain-voyager -n oigns
$ helm delete voyager-ingress -n voyager
$ kubectl delete namespace voyager
or if using SSL:
$ helm delete governancedomain-voyager -n oigns
$ helm delete voyager-ingress -n voyagerssl
$ kubectl delete namespace voyagerssl