Uninstall

Learn how to clean up the Oracle WebCenter Content domain setup.

Stop all Administration and Managed server pods

First stop the all pods related to a domain. This can be done by patching domain “serverStartPolicy” to “NEVER”. Here is the sample command for the same.

$ kubectl patch domain wcc-domain-name -n wcc-namespace --type='json' -p='[{"op": "replace", "path": "/spec/serverStartPolicy", "value": "NEVER" }]'

For example:

kubectl patch domain wccinfra -n wccns --type='json' -p='[{"op": "replace", "path": "/spec/serverStartPolicy", "value": "NEVER" }]'

Remove the domain

  1. Remove the domain’s ingress (for example, Traefik ingress) using Helm:

    $ helm uninstall wcc-domain-ingress -n sample-domain1-ns
    

    For example:

    $ helm uninstall wccinfra-traefik -n wccns
    
  2. Remove the domain resources by using the sample delete-weblogic-domain-resources.sh script present at ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/delete-domain:

    $ cd ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/delete-domain
    $ ./delete-weblogic-domain-resources.sh -d sample-domain1
    

    For example:

    $ cd ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/delete-domain
    $ ./delete-weblogic-domain-resources.sh -d wccinfra
    
  3. Use kubectl to confirm that the server pods and domain resource are deleted:

    $ kubectl get pods -n sample-domain1-ns
    $ kubectl get domains -n sample-domain1-ns
    

    For example:

    $ kubectl get pods -n wccns
    $ kubectl get domains -n wccns
    

Drop the RCU schemas

Follow these steps to drop the RCU schemas created for Oracle WebCenter Content domain.

Remove the domain namespace

  1. Configure the installed ingress load balancer (for example, Traefik) to stop managing the ingresses in the domain namespace:

    $ helm upgrade traefik-operator traefik/traefik \
        --namespace traefik \
        --reuse-values \
        --set "kubernetes.namespaces={traefik}" \
        --wait
    
  2. Configure the operator to stop managing the domain:

    $ helm upgrade  sample-weblogic-operator \
      kubernetes/charts/weblogic-operator \
      --namespace sample-weblogic-operator-ns \
      --reuse-values \
      --set "domainNamespaces={}" \
      --wait
    

    For example:

    $ cd ${WORKDIR}/weblogic-kubernetes-operator
    $ helm upgrade weblogic-kubernetes-operator \
      kubernetes/charts/weblogic-operator \
      --namespace opns \
      --reuse-values \
      --set "domainNamespaces={}" \
      --wait
    
  3. Delete the domain namespace:

    $ kubectl delete namespace sample-domain1-ns
    

    For example:

    $ kubectl delete namespace wccns
    

Remove the operator

  1. Remove the operator:

    $ helm uninstall sample-weblogic-operator -n sample-weblogic-operator-ns
    

    For example:

    $ helm uninstall weblogic-kubernetes-operator -n opns
    
  2. Remove the operator’s namespace:

    $ kubectl delete namespace sample-weblogic-operator-ns
    

    For example:

    $ kubectl delete namespace opns
    

Remove the load balancer

  1. Remove the installed ingress based load balancer (for example, Traefik):

    $ helm uninstall traefik -n traefik
    
  2. Remove the Traefik namespace:

    $ kubectl delete namespace traefik
    

Delete the domain home

To remove the domain home that is generated using the create-domain.sh script, with appropriate privileges manually delete the contents of the storage attached to the domain home persistent volume (PV).

For example, for the domain’s persistent volume of type host_path:

$ rm -rf /scratch/k8s_dir/WCC