<p>I'm running a Kubernetes cluster (GCP) with 10 deployments. Each deployment is configured to auto scale on stress. </p>

<p>From my website statistics, I found that Monday is the day with the most load. I want to define Kubernetes deployment to have more <code>min-replicas</code> on this day.</p>

<p>Is this possible? </p>

<p>I read somewhere that I can run a cronjob script before and after this day and change the minimum number of machines. Is that the current way to do it? Is this safe? what if the cronjob wasn't fired? If this is the current way, please link me for some instruction how to do it. </p>

<p>Thanks!</p>

<p>You seem to be talking of two things here. </p>

<ol>
<li><p>Pod autoscaling (Add more pods when load on existing pods increases) : HPA will help with this. If your workloads show a spike in CPU or memory and can handle horizontal scaling, then HPA would work fine. 
Example : <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/</a></p></li>
<li><p>Now HPA can increase pods only if the cluster has enough nodes to schedule them. 
If it is desired to have more nodes with more traffic and reduce them when traffic is low, a cluster autoscaler could be a good option. 
<a href="https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler" rel="nofollow noreferrer">https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler</a></p></li>
</ol>

<p>Ofcourse, the scaling of nodes is not instantaneous as the autoscaler watches for pods which are in Pending state due to resource level constraints. After this, it requests additional nodes from the cloud provider and once these nodes join the cluster, workloads get scheduled. </p>
