https://rancher.com/ logo
Title
f

famous-traffic-65054

08/02/2022, 4:37 PM
👋 Hi everyone! I installed Rancher Desktop for the first time yesterday and have started using it in my microservices setup. I was using docker desktop all this time until I decided to give Rancher a try. So, the services in my cluster have come up, however, there are two services which need to connect to an external postgres database. For this I created a service and its related endpoint associating the database name with the external ip. This is what my service and endpoint looks like:
---
kind: Service
apiVersion: v1
metadata:
name: gameserver-db-postgresql
spec:
clusterIP: None
ports:
- port: 5432
---
kind: Endpoints
apiVersion: v1
metadata:
name: gameserver-db-postgresql
subsets:
- addresses:
- ip: 10.176.252.38
ports:
- port: 5432
name: gameserver-db-postgresql
I can clearly see that this endpoint shows up correctly and I even ran a netshoot pod in my namespace to ping that endpoint, and I'm able to do that correctly. However, the services in my namespace, they give error about failure to connect with the db. The same setup worked fine in the docker and KIND cluster. So I wanted to check if there's a way to expose an external database to be able to connect by the services running inside the cluster. Any help would be highly appreciated! Thanks, Asheesh
c

curved-zebra-30454

08/02/2022, 5:35 PM
I recommend that you come join us and repost over on #rancher-desktop . We're pretty active over there 🙂
f

famous-traffic-65054

08/02/2022, 5:39 PM
Sure, thanks for the update Phil. Will post in the other channel.