I have a nodejs application that runs every month and fetches data from an external database. It has some environment variables. Can I run this as a Cronjob in Kubernetes and is it possible to define env variables and also source the env variable from secretfile in the cronjob ?
Ofcourse, CronJob spec takes the same template as Pod spec. This means you can specify env variables (reference from secrets or config maps) just like you would do it for a Pod.