apiVersion: v1 kind: Service metadata: name: oracle-service namespace: oracle labels: app: oracle spec: type: NodePort ports: - name: oracle port: 1521 nodePort: 30521 targetPort: oracle selector: app: oracle tier: oracle --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: oracle-pv-claim namespace: oracle labels: app: oracle spec: accessModes: - ReadWriteOnce resources: requests: storage: 25Gi selector: matchLabels: app: oracle --- apiVersion: apps/v1 kind: Deployment metadata: name: oracle namespace: oracle labels: app: oracle spec: selector: matchLabels: app: oracle tier: oracle strategy: type: Recreate template: metadata: labels: app: oracle tier: oracle spec: containers: - image: container-registry.oracle.com/database/free:latest name: oracle env: - name: ORACLE_PWD valueFrom: secretKeyRef: name: oracle-pass key: password ports: - containerPort: 1521 name: oracle volumeMounts: - name: oracle-persistent-storage mountPath: /opt/oracle volumes: - name: oracle-persistent-storage persistentVolumeClaim: claimName: oracle-pv-claim