--- apiVersion: v1 kind: Service metadata: name: postgres # Sets service name labels: app: postgres # Labels and Selectors spec: type: NodePort # Sets service type ports: - port: 5432 # Sets port to run the postgres application selector: app: postgres