apiVersion: v1
kind: Service
metadata:
  name: app-date-todos
  labels:
    service: app-date-todos
spec:
  ports:
  - port: 80
    name: "80"
    targetPort: 80
  - port: 81
    name: "81"
    targetPort: 81
  selector:
    service: app-date-todos
  type: LoadBalancer



# In the end I did not manage to make the nodetype be accessible
# This way we can access the app externally: https://kubernetes.io/docs/concepts/services-networking/service/#nodeport
#spec:
#  type: NodePort
 # selector:
 #   app: app-date-todos
 # ports:
      # By default and for convenience, the `targetPort` is set to the same value as the `port` field.
#    - port: 80
 #     targetPort: 80
      # Optional field
      # By default and for convenience, the Kubernetes control plane will allocate a port from a range (default: 30000-32767)
 #     nodePort: 30007



