<p>I want to schedule kubernetes cronjob in my local timezone (GMT+7), currently when I schedule cronjob in k8s I need to schedule in UTC but I want to schedule in my local timezone, As specify in <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/" rel="noreferrer">Kubernetes document</a>, that I need to change timezone in kube-controller manager as follows</p>
<blockquote>
<p>All CronJob schedule: times are based on the timezone of the
kube-controller-manager.</p>
<p>If your control plane runs the kube-controller-manager in Pods or bare
containers, the timezone set for the kube-controller-manager container
determines the timezone that the cron job controller uses.</p>
</blockquote>
<p>But I can't find a way to set timezone for kube-controller-manager, I'm using Kuberenetes on-premise v1.17, I found controller manager manifest file in - /etc/kubernetes/manifests/kube-controller-manager.yaml but can't find a way to or document to change the it's timezone.</p>

Teerakiat Chitawattanarat
<p>Now, if you use Kubernetes version 1.25 can use the field <code>timeZone</code> to specify a time zone for a CronJob.</p>
<pre><code>spec:
  timeZone: &quot;Asia/Bangkok&quot;
  schedule: &quot;0 17 * * *&quot;
</code></pre>
<p>But if Kubernetes version &lt; 1.25 and &gt;= 1.21 you can fix the timezone in line with the schedule field.</p>
<pre><code>spec:
  schedule: &quot;CRON_TZ=Asia/Bangkok 0 17 * * *&quot;
</code></pre>
<p>Official document: <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones" rel="noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones</a></p>
<p>TimeZone list: <a href="https://www.ibm.com/docs/en/cloudpakw3700/2.3.0.0?topic=SS6PD2_2.3.0/doc/psapsys_restapi/time_zone_list.html" rel="noreferrer">https://www.ibm.com/docs/en/cloudpakw3700/2.3.0.0?topic=SS6PD2_2.3.0/doc/psapsys_restapi/time_zone_list.html</a></p>
