apiVersion: v1
kind: Service
metadata:
  name: dev-kub-todolist-svc
spec:
  type: NodePort
  selector:
    app: dev-kub-todolist # This is the app as declared in the deployment.
  ports:
    - name: http
      nodePort: 30080 # This is the port that is available outside. Value for nodePort can be between 30000-32767
      protocol: TCP
      port: 1234 # This is a port that is available to the cluster, in this case it can be ~ anything
      targetPort: 3000 # This is the target port