0

I have Jenkins POD that mounts a pv with a pvc. Now I want to create a cronjob that use the same pvc in order to do some log rotation on jenkins build.
How can I access to Jenkins PVC from cronjob in order to do some batch procedures on PV?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
adev
  • 367
  • 1
  • 3
  • 20

1 Answers1

2

How can I access to Jenkins PVC from cronjob in order to do some batch procedures on PV?

Personally I think you can consider the following ways to share Jenkins PVC with CronJob pods.

  • Share PV which is created as ReadWriteMany with two PVC, such as Jenkins PVC and CrontJob PVC. Refer Sharing an NFS mount across two persistent volume claims for more details.

  • OR mount Jenkins PVC when CronJob Pod start up after stopping the Jenkins Pod. It's required to stop Jenkins Pod before mount the PVC with Cronjob pod.

I hope it help you.

Daein Park
  • 4,393
  • 2
  • 12
  • 21