apiVersion: v1
kind: Service
metadata:
  name: nginx-nodeport
  labels:
    app: nginx-nodeport
spec:
  type: NodePort # type of service
  selector: # pod template labels which the service will apply to
    tier: frontend
  ports: # define container target port and port for the service
    - port: 80
      targetPort: 80
      nodePort: 31000 # optional
