NTP (Network Time Protocol) is for keeping hosts in sync with the world clock.
Time synchronization is important for time sensitive operations, such as log
keeping and time stamps, and is highly recommended for Kubernetes, which
OKD is built on. OKD operations include etcd leader
election, health checks for pods and some other issues, and helps prevent time
skew problems.
|
|
The OKD installation playbooks install, enable, and configure the
ntp package to provide NTP service by default. To disable this behavior, set
openshift_clock_enabled=false in the inventory file. If a host has the
chrony package already installed, it is configured to provide NTP service
instead of using the ntp package.
|
Depending on your instance, NTP might not be enabled by default. To verify that
a host is configured to use NTP:
$ timedatectl
Local time: Thu 2017-12-21 14:58:34 UTC
Universal time: Thu 2017-12-21 14:58:34 UTC
RTC time: Thu 2017-12-21 14:58:34
Time zone: Etc/UTC (UTC, +0000)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
If both NTP enabled and NTP synchronized are yes, then NTP synchronization
is active.
If no, install and enable the ntp or chrony RPM package.
To install the ntp package, run the following command:
# timedatectl set-ntp true
To install the chrony package, run the following commands:
# yum install chrony
# systemctl enable chronyd --now
|
|
Time synchronization should be enabled on all hosts in the cluster, whether using NTP or any other method.
|