Open Seljuke opened 3 years ago
Thank you for your suggestion.
Is this feature for a production usage of for a local usage?
Exposing Postgres database via NodePort can expose security risks in production.
I'm using kubegres in production and staging environments mainly for creating HA environments to third party tools like keycloak. Our infrastructure running behind firewalls and clusters are on-premise servers so just exposing ports wouldn't produce risks for us.
Thank you for those details.
I added this feature in the backlog and I will use the current issue number when committing my changes.
In term of availability, I will try to get it done this week. If it cannot be done this week, it would be end of October as I am working on this project during the last week of each month and for 1 week consecutively.
I am not sure this way is right but it has worked for me and doesn't require any uid
apiVersion: v1
kind: Service
metadata:
name: postgres-write
namespace: default
labels:
app: postgres-write
spec:
type: NodePort
ports:
- name: postgres-write
port: 5432
nodePort: 30001
selector:
app: postgres
replicationRole: primary
---
apiVersion: v1
kind: Service
metadata:
name: postgres-read
namespace: default
labels:
app: postgres-read
spec:
type: NodePort
ports:
- name: postgres-read
port: 5432
nodePort: 30002
selector:
app: postgres
replicationRole: replica
Is LoadBalancer and Nodeport are available in the current release of Kubegres?
Hi,
It would be great to have a way to change primary and replica service types from default ClusterIP to LoadBalancer and NodePort. Right now I'm using nginx ingress TCP loadbalancing but it adds complexity and dependency to ingress pod.
Something like below would be great;
If method at #44 wouldn't require UID of original service I could create a helm chart that can create external facing service with pre-install hook.