ORDS is a piece of software that acts as an intermediary between Oracle Database and the layers where business logic is implemented and/or consumed.
NOTE: If your database hasn’t been set up for ORDS just google for it or take a look at this post.
With ORDS you expose database objects as REST. ORDS can be started standalone or in an application server. Deploying ORDS in Kubernetes as stateless pods with several replicas provide an elastic layer of rest exposition, out of the database, with high availability and fault tolerant.
First of all, we need a container ready to run ORDS in standalone mode. For this particular case, we are utilizing one already done and available here. If you are curious about how to build it, I’ll post an article in the coming days.
Let’s start creating a secret for storing the password for the user that makes de connection to the database:
kubectl create secret generic ordspassword --type=string --from-literal=password=[somepassword]
- image: javiermugueta/ordscontainer env: - name: DB_HOSTNAME value: "example:172.16.0.7" - name: DB_PORT value: "example:1521" - name: DB_SERVICENAME value: "example:jsonpdb.dnslabel1.skynet.oraclevcn.com" - name: APEX_PUBLIC_USER_NAME value: "ORDS_PUBLIC_USER" - name: ORDS_PASS valueFrom:
kubectl apply -f my.yaml
kubectl get svc
javiermugueta$ kubectl get svc NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE eciveci LoadBalancer 10.96.92.19 184.108.40.206 3000:31522/TCP 4d kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 15d ordscontainer LoadBalancer 10.96.229.248 220.127.116.11 8080:31523/TCP 2d
Me and my circumstance