You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.4 KiB

  1. # NTP synchronization
  2. The Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems. Time synchronization is important to Kubernetes and Etcd.
  3. ## Enable the NTP
  4. To start the ntpd(or chrony) service and enable it at system boot. There are related specific variables:
  5. ```ShellSession
  6. ntp_enabled: true
  7. ```
  8. The NTP service would be enabled and sync time automatically.
  9. ## Customize the NTP configure file
  10. 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.
  11. ```ShellSession
  12. ntp_enabled: true
  13. ntp_manage_config: true
  14. ntp_servers:
  15. - "0.your-ntp-server.org iburst"
  16. - "1.your-ntp-server.org iburst"
  17. - "2.your-ntp-server.org iburst"
  18. - "3.your-ntp-server.org iburst"
  19. ```
  20. ## Setting the TimeZone
  21. The timezone can also be set by the `ntp_timezone` , eg: "Etc/UTC","Asia/Shanghai". If not set, the timezone will not change.
  22. ```ShellSession
  23. ntp_enabled: true
  24. ntp_timezone: Etc/UTC
  25. ```
  26. ## Advanced Configure
  27. 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.
  28. ```ShellSession
  29. ntp_tinker_panic: true
  30. ```
  31. Force sync time immediately by NTP after the ntp installed, which is useful in newly installed system.
  32. ```ShellSession
  33. ntp_force_sync_immediately: true
  34. ```