kubernetes部署oracle-ee-11g
pvc oralce
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: oracle
namespace: sre
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: "250Gi"
volumeName:
storageClassName: nfs
Deployment oralce
apiVersion: apps/v1
kind: Deployment
metadata:
name: oralce
namespace: sre
spec:
replicas: 1
selector:
matchLabels:
app: oralce
strategy:
type: Recreate
template:
metadata:
labels:
app: oralce
spec:
containers:
- image: mybook2019/oracle-ee-11g:v1.0
imagePullPolicy: IfNotPresent
name: oralce
ports:
- containerPort: 1521
name: oralce1521
- containerPort: 8080
name: oralce8080
volumeMounts:
- name: oralce-data
mountPath: /u01/app/oracle
volumes:
- name: oralce-data
persistentVolumeClaim:
claimName: oracle
svc oralce
apiVersion: v1
kind: Service
metadata:
name: oralce
namespace: sre
labels:
app: oralce
spec:
type: NodePort
ports:
- port: 1521
targetPort: 1521
nodePort: 31521
name: oracle1521
- port: 8080
targetPort: 8080
name: oralce8080
nodePort: 32080
selector:
app: oralce
连接信息
hostname: 10.240.0.4
port: 31521
sid: EE
service name: EE.oracle.docker
username: system
password: oracle
例如
sqlplus system/oracle@//10.240.0.4:31521/EE.oracle.docker