Environment Variables inside a Cronjob in Kubernetes

0 votes

I have a nodejs application that runs every week 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 ?

Sep 18, 2018 in Kubernetes by lina
• 8,220 points
3,591 views

1 answer to this question.

0 votes
Ofcourse you can. Cron job specification is very similar to pod specification. You can define environment variables just the way we do for pods.
answered Sep 18, 2018 by Kalgi
• 52,360 points

Related Questions In Kubernetes

0 votes
1 answer

How to use gravitational teleport in a container/kubernetes environment?

You can use teleport to augment kubernetes ...READ MORE

answered Jun 28, 2018 in Kubernetes by ajs3033
• 7,300 points
2,217 views
0 votes
1 answer

What all components run inside a worker node to provide a kubernetes runtime environment?

Node components run on every node, maintaining ...READ MORE

answered Jul 24, 2019 in Kubernetes by Sirajul
• 59,230 points
745 views
0 votes
1 answer

How to copy file inside a Pod in Kubernetes?

Hi@akhtar, You need to use the kubectl cp command ...READ MORE

answered Jul 5, 2020 in Kubernetes by MD
• 95,440 points
4,416 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
14,525 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 5,978 views
0 votes
1 answer

Running a cronjob in kubernetes

You will find the CronJobresource in the batch/v1beta1 API group. ...READ MORE

answered Sep 6, 2018 in Kubernetes by Kalgi
• 52,360 points
563 views
0 votes
1 answer

Running A cronjob in a pod in Kubernetes

Unfortunately, you cannot run the CronJob inside a container ...READ MORE

answered Sep 17, 2018 in Kubernetes by Kalgi
• 52,360 points
2,064 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP