Does anyone have any experience connecting GrowthB...
# ask-questions
Does anyone have any experience connecting GrowthBook to OpenReplay as a data source? I am not sure how to get Kubernetes to expose the postgresql port so that Growthbook can query it.
Hi Steve. I haven't had any experience with OpenReplay, but I am happy to try an help. So you have a postgres instance running in Kubernetes that you want growthbook cloud to call, or do you have self hosted growthbook server?
If it is a growthbook cloud account, I think you will need to 1. add a NodePort Service to your postgres.yaml file 2. restrict access to the port you choose to growthbook's ip address ( by creating a NetworkPolicy in a postgres-policy.yaml file. 3. create a postgres readonly user with read permissions only on the appropriate tables. Let me know if you need more help, or ask ChatGPT, as I think it is fairly accurate with its suggestions on how to do those things.
I have a self-hosted growthbook server. We want to query postgres which stores the OpenReplay data structure with Growthbook to add metadata to Growthbook. OpenReplay runs on kubernetes but I'm not familiar with the syntax and I think I need to add a new nginx-ingress server to the config to allow access to the postgresql port.
I haven't really used kubernetes before but I think you need to add a network policy yaml file to allow it along the lines of:
Copy code
apiVersion: <|>
kind: NetworkPolicy
  name: allow-postgresql-access
      app: postgresql
  - from:
    - podSelector:
          app: growthbook
Assuming the growthbook pod has such a label.
Thanks James, in the end we edited the pod and changed from ClusterIp to Loadbalancer and restricted access to the port from a specific IP.