How can I run Pact Broker with postgres in Kubernetes?

1.8k Views Asked by At

Am taking this as sample microservice consumer & provider

https://github.com/anha1/microservices-pact-maven

Packbroker Docker

https://github.com/DiUS/pact_broker-docker

How to deploy and run the pact_broker with postgres in Kubernetes?

  • I have pact_broker image without postgres in docker
  • how to configure postgres for pact_broker while deploy the pact_broker in kubernetes?
1

There are 1 best solutions below

0
On BEST ANSWER

We can deploy PactBroker in Kubernetes,

  1. We need Docker postgres image, deploy in kubernetes
    • Kubernetes svc yaml file for postgres, have to mention the "type : ClusterIP" & "targetPort: 5432"in spec
  2. We need Docker PactBroker image, deploy in kubernetes
    • Kubernetes svc yaml file for pactbroker, have to mention the "type : NodePort" & "targetPort: 80" in spec

Sample image - Pact app running in Kubernetes