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

2/14/2018

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?

-- osipov
google-kubernetes-engine

1 Answer

2/14/2018

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.

-- osipov
Source: StackOverflow