apiVersion: v1 kind: Service # Create service metadata: name: postgres # Sets the service name namespace: postgres labels: app: postgres # Defines app to create service for spec: type: NodePort # Sets the service type ports: - port: 5432 # Sets the port to run the postgres application selector: app: postgres