---
apiVersion: v1
kind: Service
metadata:
namespace: pg
name: postgres
labels:
app: postgres
spec:
selector:
ports:
- protocol: TCP
port: 5432
#nodePort: 30432
#type: NodePort
kind: Endpoints
name: postgres #<------ Should match the name of Service
subsets:
- addresses:
- ip: 10.0.4.12
- port: 5432