0

I am writing the scripting where I want to put my job on hold and resume it after sometime in the open shift platform.

Is there any CLI command to hold a job for sometime and resume it later.

Prabhakar
  • 69
  • 2
  • 8

1 Answers1

0

You can suspend a job if you're running Kubernetes 1.21 or later: See here

Blender Fox
  • 4,442
  • 2
  • 17
  • 30
  • Fox ...Thank you for quick reply . I am unbale to figure the kubectl command to suspend a job in the above link. Could you please provide me the kubectl command so that I can place it in my script. – Prabhakar Apr 04 '22 at 08:29
  • Most likely something like `kubectl patch jobs -n {namespace} {job-name} -p '{"spec" : {"suspend" : true }}'` – Blender Fox Apr 04 '22 at 08:38