How to send emails on job completion
You can set your Job to notify you when they complete, fail, or restart.
Email notifications are available for NYU addresses only.
All you need to do is add a label to enable notifications, and an annotation to list the recipients, for example:
apiVersion: batch/v1
kind: Job
metadata:
labels:
k8s-emailer.hpc.nyu.edu/mode: "complete"
# "all": email for all status changes (succeeds, fails, restarts)
# "complete": email for failure or success
# "failure": email for failure (not success)
annotations:
k8s-emailer.hpc.nyu.edu/addresses: "alice@example.org, bob@example.org"
# ...
spec:
# ...