Cron job timing with new nodes
Say I have a kubernetes Cron Job that runs every day at 10am but it needs to provision new nodes in order for it to run. Will k8 wait until 10am to start provisioning those resources (therefore actually running some time after 10am)? Or will it have everything ready to go at 10am? Are there settings to control this?
Solution 1:
Will k8 wait until 10am to start provisioning those resources...
No. K8s does not provision a computer node and make the computer join the cluster.
...will it have everything ready to go at 10am?
The job will be created at the scheduled time and pod will be spawn. At that time if your cluster runs out of node to run the pod, the pod will enter pending state. At this point if you have configured autoscaler in your cluster, autoscaler will request for a new node to join your cluster so that the pending pod can run.