How to feed kubernetes hostname as env variable

I’m creating a workload that is intended to run as a cronjob and run on every etcd node.

How can I feed to kubernetes nodename to the container as an environment variable? Is there any kind of variable substitution you can do in a pod spec?

Thx

check this out https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/