apiVersion: v1
kind: Service
metadata:
  name: demo-nodeport-svc
  labels:
    app: demo-nodeport
spec:
  type: NodePort
  ports:
    - port: 80
      protocol: TCP
      targetPort: 80    # if not define then default is same as port.
#      nodePort: 30001   # if not define then add port based on nodePort range
  selector:
    app: demo-nginx