Setting the Node Time Zone
All nodes of a cluster should run with one agreed time zone, so that platform
logs, audit records and monitoring timelines line up with the operator's wall
clock. On Alauda OS nodes you set the time zone with a MachineConfig object —
never by logging in to nodes and changing them one by one.
The time zone cannot be shipped as a file: /etc/localtime is a symbolic link,
and machine configuration manages file contents, systemd units, and SSH public
keys — not symbolic links. Instead, a oneshot systemd unit runs
timedatectl set-timezone on each node.
Configure the Node Disruption Policy First
Without a node disruption policy, a systemd unit
change falls back to the default action — rebooting the node — so applying
the MachineConfig below would roll every node in the pool through a drain and
reboot. Configure the policy first, confirm it took effect, and only then apply
the MachineConfig.
-
Add
set-timezone.serviceto thenodeDisruptionPolicy.unitslist of the cluster-scopedMachineConfigurationsingleton namedcluster:WARNINGclusteris a singleton that may already carry policies for other units or files — for example the/etc/chrony.confentry from Configuring the Chrony Time Service. Append to theunitslist; do not replace the existing policy. Any unit not listed falls back to the default reboot action. -
Confirm the policy is active before going on:
Apply the Time Zone
Create one MachineConfig per role — the two objects differ only in
metadata.name and the role label. Replace Asia/Shanghai with the agreed
tz database name; do not deliver the example value unchanged.
Verify
Wait until each pool reports UPDATED=True and DEGRADED=False, and confirm
no node went through an unexpected drain or reboot. Then spot-check nodes:
Platform logs, audit records and monitoring timelines should now agree with the configured time zone.
Related Notes
- Time zone at install time is a host prerequisite — see the bare metal page's Host Clock and Time Zone requirements. This page is for normalizing or changing the time zone on a running cluster.
- Time synchronization is a separate concern, configured through Configuring the Chrony Time Service.