<p>We can define memory and cpu requests/limits for pods, it is not a problem. Is it possible to define different memory and cpu requests/limits based on time plan? I think about something like that:</p>
<pre><code>8AM - 8PM
 - CPU request 0.5, limit 2
 - RAM request 1Gi, limit 2Gi

8:01PM - 7:59AM
 - CPU request 0.1, limit 0.5
 - RAM request 500Mi, limit 1Gi
</code></pre>
<p>It can help us with tuning of performance based on e.g. high performance real-time processing during the day and lower performance the same pods during the night. Did you solve similar challenge?</p>

JIST
<p>This is not something supported by kubernetes core.</p>
<p>This has been discussed many times (<a href="https://github.com/kubernetes/kubernetes/issues/50569" rel="nofollow noreferrer">here</a> or <a href="https://github.com/kubernetes/kubernetes/issues/49931" rel="nofollow noreferrer">there</a> for example)</p>
<p>I can see two ways of solving this challenge :</p>
<ul>
<li>Using a <code>cronJob</code> and an image that embeds a <code>kubectl</code> binary to patch up/down your ressources</li>
</ul>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: batch/v2alpha1
kind: CronJob
metadata:
  name: patch-memory
spec:
  schedule: &quot;0 8 * * *&quot;
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: scale
            image: &lt;your-repo&gt;/kubectl:&lt;tag&gt;
            command:
            - kubectl.sh
            - kubectl
            - patch
            - deployment
            - &lt;your deployment&gt;
            - --patch 
            - '{&quot;spec&quot;: {&quot;template&quot;: {&quot;spec&quot;: {&quot;containers&quot;: [{&quot;name&quot;: &quot;&lt;your container&gt;&quot;: {&quot;resources&quot;: {&quot;requests&quot;: {&quot;memory&quot;: &quot;XXXMi&quot; }}}}]}}}}'
          restartPolicy: OnFailure
</code></pre>
<ul>
<li>Using a custom controler like <a href="https://github.com/amelbakry/kube-schedule-scaler" rel="nofollow noreferrer">this one</a> or <a href="https://github.com/maheshrayas/kube-saver" rel="nofollow noreferrer">this one</a> or others you can find online. I have no experience using those projects myself.</li>
</ul>
<p>You could also consider using <a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" rel="nofollow noreferrer">Horizontal Pod Autoscaling</a>  : This  allows you to add more <code>pod</code> on a <code>deployment</code> or <code>statefulsets</code> based on resources usage.</p>
<p>On another hand, you could also use <a href="https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler" rel="nofollow noreferrer">VPA</a>. This will dynamically set resources requests/limits on your workload based on their resources usage - not in a cron style like you mentioned</p>
