Examples followed

apiVersion: v1
kind: PersistentVolume
metadata:
  name: task-pv-volume
  labels:
    type: local
spec:
  storageClassName: manual
  capacity:
    storage: 20Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data"
- Touch xe_singleinstancedatabase.yaml
	- Source = [https://github.com/oracle/oracle-database-operator/blob/main/config/samples/sidb/singleinstancedatabase_express.yaml](https://github.com/oracle/oracle-database-operator/blob/main/config/samples/sidb/singleinstancedatabase_express.yaml)
	- namespace: oracle-namspace
	- oracle_pwd: PASS_GOES_HERE
	- size: 10Gi
  • kubectl apply -f xe_singleinstancedatabase.yaml -n oracle-namespace
  • How to check status of DB?
    • List databases
      • kubectl get singleinstancedatabases -o name -n oracle-namespace
    • Database status
      • kubectl get singleinstancedatabase -n oracle-namespace 
        • Note: wait until it says healthy
    • Database health
      • kubectl get singleinstancedatabase sidb-oci -o “jsonpath={.status.status}” -n oracle-namespace
    • Database connection string
      • kubectl get singleinstancedatabase sidb-oci -o “jsonpath={.status.connectString}” -n oracle-namespace
    • Database enterprise manager url
      • kubectl get singleinstancedatabase sidb-oci -o “jsonpath={.status.oemExpressUrl}” -n oracle-namespace
    • SID name
      • kubectl get singleinstancedatabase sidb-oci -o “jsonpath={.status.sid}” -n oracle-namespace
    • Pluggable Database Name (PDB)
      • kubectl get singleinstancedatabase sidb-oci -o “jsonpath={.status.pdbName}” -n oracle-namespace
    • PDB Connection String
      • kubectl get singleinstancedatabase sidb-oci -o “jsonpath={.status.pdbConnectString}” -n oracle-namespace
    • Database details
      • kubectl get pods -n oracle-namespace -o wide
        • Note: the Oracle database host name is the pod name not the Kubernetes node.
    • Database storage details
      • kubectl get pvc -n oracle-namespace
  • Connect to DB
    • kubectl exec -it pods/sidb-oci-7r5vz -n oracle-namespace — sqlplus system/PASS_GOES_HERE@XEPDB1
    • kubectl exec -it pods/sidb-oci-o8qma -n oracle-namespace — sqlplus system/PASS_GOES_HERE@SIDB1