apiVersion: v1
kind: Service
metadata:
  name: pgsql-service
  namespace: default
  labels:
    name: pgsql-service
spec:
  selector:
    app: pgsql
  type: ClusterIP
  ports:
    - port: 5432
      targetPort: 5432
      protocol: TCP
      name: pgsql