How to run RCU against an external database from within a temporary pod in an OKE cluster


We have an OKE cluster and a database outside the OKE which IP is reachable via the appropriate routing.

What we want to chase is to create RCU schemas in the database by running RCU from a pod.

The way to do it is by creating a service in the cluster with a ClusterIP and port(the database port) and then create and endpoint that “points” to the external database.

Steps

#
# use the following yaml as a starting point
#
wget https://raw.githubusercontent.com/javiermugueta/rawcontent/master/k8s-database-service-proxy.yaml
#
# edit the yaml and put the ip and port of your database, and then
kubectl apply -f /k8s-database-service-proxy.yaml
#
# run rcu in a pod
kubectl run rcu --generator=run-pod/v1 --image javiermugueta/wls -- sleep infinity
#
# get logged into the pod
kubectl exec -ti rcu /bin/bash
#
# execute rcu (put the appropiate connect string)
/u01/oracle/oracle_common/bin/rcu -silent -createRepository -databaseType ORACLE -connectString database:1521/10.0.10.7 -dbUser sys -dbRole sysdba -useSamePasswordForAllSchemaUsers true -selectDependentsForComponents true -schemaPrefix FMW1 -component MDS -component IAU -component IAU_APPEND -component IAU_VIEWER -component OPSS -component WLS -component STB
#
# exit the pod when finished
exit
# delete the pod
kubectl delete pod rcu
#
# that's all

Hope it helps! 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.