Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set the correct time in my Google Kubernetes Engine container? Do I need to configure NTP?

The containers in my k8s cluster need to be set to the correct time with high accuracy, meaning that I can only handle 10s of milliseconds difference max.

Do I need to setup NTP configuration for the containers on Google Kubernetes Engine to make sure that that clock in the containers is set to the correct time?

like image 732
osipov Avatar asked Feb 14 '18 17:02

osipov


People also ask

How do I sync my Google NTP time?

You can configure the controller to use Google Public NTP.) Click the "Change settings..." button. Check the box "Synchronize with an Internet time server". Next to "Server:", enter time.google.com .

Does Google have an NTP server?

Google Public NTP is a free, global time service that you can use to synchronize to Google's atomic clocks. It implements the leap smear to smoothly handle leap seconds without disruptions.


1 Answers

No. You don't need to do any of your own NTP configuration. Google Kubernetes Engine (GKE) runs a timesyncd service in each of the containers. The service is pre-configured to sync up with Google's NTP servers. If you want to set the time yourself, you need to stop the timesyncd service and override the time settings manually.

like image 79
osipov Avatar answered Sep 27 '22 22:09

osipov