kubelet and etcd wait for the time to be in sync before starting, as they don’t support graceful certificate rotation.
By default, Talos Linux uses time.cloudflare.com as the NTP server, but it can be overridden in the machine configuration, or provided via DHCP, kernel args, platform sources, etc.
Talos Linux implements SNTP protocol to sync time with the NTP server, optionally secured with NTS.
Observing status
Current time sync status can be observed with:USENTS column shows whether the servers are queried with NTS enabled.
More detailed logs about the time sync process can be queried with:
Network time security (NTS)
Plain NTP is unauthenticated, so an on-path attacker can skew the clock of a node, which in turn breaks TLS certificate validation, log ordering and distributed consensus. NTS fixes that: Talos Linux first performs a TLS key exchange with the time server, and the NTP packets exchanged afterwards are cryptographically authenticated with the keys established during the key exchange. When no time servers are configured (from the machine configuration or any other source), Talos Linux uses the defaulttime.cloudflare.com server with NTS enabled.
Once time servers are configured, NTS is only used when it is explicitly enabled with the useNTS field of the
TimeSyncConfig document:
4460 (unless the server address specifies a different port), while the NTP queries keep using UDP port 123
(or the port negotiated during the key exchange).
Changing the useNTS setting restarts the time syncer without a reboot.
NTS with an incorrect clock at boot
The NTS key exchange runs over TLS, and TLS validates the server certificate against the current system clock, but the clock is exactly what has not been set yet at that point of the boot sequence: a machine without a working RTC (or with a badly skewed one) would never be able to establish an NTS session. To break this cycle, Talos Linux tolerates certificate validity period failures for the first few NTS session attempts of the boot sequence (before the time has been synced at least once). In that case the certificate chain and the hostname are still fully verified — only thenotBefore/notAfter timestamps are ignored, with the verification time pinned
to the certificate’s own notBefore.
Certificates which fail validation for any other reason (unknown authority, hostname mismatch, etc.) are always rejected.
Each time this fallback is used, a warning is logged:
Note: this fallback covers the NTS key exchange only. If the time servers are configured as hostnames, they still have to be resolved, and encrypted DNS (DoT/DoH) validates certificates strictly at all times. When all nameservers use encrypted DNS and the clock is wrong at boot, resolution of the time server names fails, and the time can never be synced: keep a plain DNS nameserver as a fallback, or configure time servers by IP address (which in turn disables NTS for them).
Using PTP devices
When running in a VM on a hypervisor, instead of doing network time sync, Talos can sync the time to the hypervisor clock (if supported by the hypervisor). To check if the PTP device is available:TimeSyncConfig to the PTP device name (e.g. /dev/ptp0):