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