Setting up PostgreSQL in OpenShift

You can connect to an external PostgreSQL database.

  1. Create a service, for example:
    kind: "Service"
    	apiVersion: "v1"
    	metadata:
    	name: "external-postgres-service"
    	spec:
    	ports:
    	-
    	name: "external-postgres-service"
    	protocol: "TCP"
    	port: 5432
    	targetPort: 5432
    	nodePort: 0
    	selector: {} 		
  2. Create an endpoint, for example:
    kind: "Endpoints"
    	apiVersion: "v1"
    	metadata:
    	name: "external-postgres-service" 
    	subsets: 
    	-
    	addresses:
    	-
    	ip: "10.97.90.56" 
    	ports:
    	-
    	port: 5432 
    	name: "external-postgres-service"
  3. In the mdmconfigmap, change the value of the MQ_MDM_DB_HOST property to external-postgres-service or add the IP address of the external PostgreSQL database.