postgres-deployment.yaml 712 B

123456789101112131415161718192021222324252627282930
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: postgres-mas
  5. spec:
  6. replicas: 1
  7. selector:
  8. matchLabels:
  9. app: postgres-mas
  10. template:
  11. metadata:
  12. labels:
  13. app: postgres-mas
  14. spec:
  15. containers:
  16. - name: postgres
  17. image: 'postgres:14'
  18. imagePullPolicy: IfNotPresent
  19. ports:
  20. - containerPort: 5432
  21. envFrom:
  22. - configMapRef:
  23. name: postgres-mas-secret
  24. volumeMounts:
  25. - mountPath: /var/lib/postgresql/data
  26. name: postgresdata-mas
  27. volumes:
  28. - name: postgresdata-mas
  29. persistentVolumeClaim:
  30. claimName: postgres-mas-volume-claim