What time is it in a Kubernetes pod? What time is it in a Kubernetes pod? kubernetes kubernetes

What time is it in a Kubernetes pod?


The clock in a container is the same as the host machine because it’s controlled by the kernel.

The timezone is controlled by the OS layer tho and so may be different in the container. You can mount in the time zone file to overcome this.

Synchronization of clocks across machines is a complicated topic. You can go as simple as installing an NTP client on all the nodes or as complex as installing GPS hardware clocks on every node.

If your Kubernetes nodes are VMs this adds another layer of complexity. Most IaaS and hypervisors provide some way of synchronizing the VM clock with the host, but you still need to keep all your host machines in sync.