apiVersion: v1
kind: Service
metadata:
  name: hello-svc-nodeport
spec:
  ports:
    - port: 8080
      # NodePort has to be in the 30000-32767 range. This directive is optional. if not defined
      # k8s will automatically define one.
      nodePort: 30000
  type: NodePort
  # Use the selector to associate this service to a pod.
  selector:
    app: hello
