# How to apply patches or any metadata changes in Pods

**URL:** <https://discuss.kubernetes.io/t/how-to-apply-patches-or-any-metadata-changes-in-pods/12909>\
**Category:** General Discussions\
**Created:** [September 22, 2020, 9:07am UTC](https://discuss.kubernetes.io/t/how-to-apply-patches-or-any-metadata-changes-in-pods/12909 "2020-09-22T09:07:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarkeshwar4u](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@tarkeshwar4u](https://discuss.kubernetes.io/u/tarkeshwar4u)\
**Post date:** [September 22, 2020, 9:07am UTC](https://discuss.kubernetes.io/t/how-to-apply-patches-or-any-metadata-changes-in-pods/12909/1 "2020-09-22T09:07:00Z")

</div>

We have our software deployed on kubenetes as deployments.

Timezone patches for the Operating System are released based on the following conditions and scenarios:

- DST or other time zone policy changes on the respective region.
- or incase of any vulnerability in the existing patches

These files are placed at /usr/share/zoneinfo.  
As content of these files are frequently changed.

What should be the best approach to updated these files.  
One option is to update image whenever there is the changes in timezone data.

Another is to update the files manually inside pods. but it will be gone once pod restarts.

Please suggest what could be the best way to update.

---

<div class="post-metadata">

**Author:** ![feloy](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/feloy/32/3669_2.png) [@feloy](https://discuss.kubernetes.io/u/feloy)\
**Post date:** [September 24, 2020, 8:17pm UTC](https://discuss.kubernetes.io/t/how-to-apply-patches-or-any-metadata-changes-in-pods/12909/2 "2020-09-24T20:17:24Z")

</div>

If the total size of your files does not exceeds 1mo, you can create a configmap with the content of these files, then mount this configmap into your Pods, in the /usr/share/zoneinfo directory.

---

<div class="post-metadata">

**Author:** ![yonatankahana](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/yonatankahana/32/9842_2.png) [@yonatankahana](https://discuss.kubernetes.io/u/yonatankahana)\
**Post date:** [April 9, 2022, 5:58am UTC](https://discuss.kubernetes.io/t/how-to-apply-patches-or-any-metadata-changes-in-pods/12909/3 "2022-04-09T05:58:20Z")

</div>

it can be done easily just by installing [k8tz](https://github.com/k8tz/k8tz) in your cluster.

```nohighlight
helm repo add k8tz https://k8tz.github.io/k8tz/
helm install k8tz k8tz/k8tz

```

by default, k8tz will enforce UTC timezone in all pods created in cluster and will mount the latest tzdb (currently `2022a`) to `/usr/share/zoneinfo` in every pod, regardless of what version installed on the nodes.

you can change the default timezone for the cluster with

```nohighlight
helm upgrade k8tz k8tz/k8tz --install --set timezone=Europe/London

```

or by annotating your namespaces:

```nohighlight
kubectl annotate namespace some-namespace k8tz.io/timezone=America/Bogota
kubectl annotate namespace other-namespace k8tz.io/timezone=Europe/Stockholm

```
