add kubespray to the XTesting as it provides newer version of kubenetes and can be...
[it/test.git] / XTesting / kubespray / docs / ntp.md
1 # NTP synchronization
2
3 The Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems. Time synchronization is important to Kubernetes and Etcd.
4
5 ## Enable the NTP
6
7 To start the ntpd(or chrony) service and enable it at system boot. There are related specific variables:
8
9 ```ShellSession
10 ntp_enabled: true
11 ```
12
13 The NTP service would be enabled and sync time automatically.
14
15 ## Custimize the NTP configure file
16
17 In the Air-Gap environment, the node cannot access the NTP server by internet. So the node can use the customized ntp server by configuring ntp file.
18
19 ```ShellSession
20 ntp_enabled: true
21 ntp_manage_config: true
22 ntp_servers:
23   - "0.your-ntp-server.org iburst"
24   - "1.your-ntp-server.org iburst"
25   - "2.your-ntp-server.org iburst"
26   - "3.your-ntp-server.org iburst"
27 ```
28
29 ## Advanced Configure
30
31 Enable `tinker panic` is useful when running NTP in a VM environment to avoiding clock drift on VMs. It only takes effect when ntp_manage_config is true.
32
33 ```ShellSession
34 ntp_tinker_panic: true
35 ```
36
37 Force sync time immediately by NTP after the ntp installed, which is useful in newly installed system.
38
39 ```ShellSession
40 ntp_force_sync_immediately: true
41 ```