apiVersion: v1
kind: Service
metadata:
  name: nodeport-svc
spec:
  type: NodePort
  selector:
    app: web
  ports:
      # By default and for convenience, the `targetPort` is set to the same value as the `port` field.
      # 8000, because we are running django app at 8000
    - port: 8000
      targetPort: 8000
      # Optional field
      # By default and for convenience, the Kubernetes control plane will allocate a port from a range (default: 30000-32767)
      nodePort: 30007
