apiVersion: v1
kind: Service
metadata:
  name: app-service
  labels:
    app: app
spec:
  selector:
    app: app
  ports:
    - name: app-port
      protocol: TCP
      port: 8080
      targetPort: 8080
      nodePort: 31080
  type: NodePort