• 13

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

Is there an option to show, that is used as NTP when i connect to a pod or to the kubernetes VM? I tried the following: ntpq -p, which results in command not found, but was listed on This file does not exist: vim /etc/ntp.conf. I need that as a proof, showing which server is used.

    • One workaround would be to go for pod with package manager, install nslookup on it and check $ nslookup It should give the IP address of After that you can check systemctl status systemd-timesyncd.service and specifically the part of Synchronized to time server.

When you create a GKE cluster you have an option to specify which operating system will be the base for your Kubernetes installation. You have the options to choose from:

  • Container-Optimized OS (cos)
  • Container-Optimized OS (cos) with containerd
  • Ubuntu
  • Ubuntu with containerd

You can choose it by following a path in Google Cloud Platform:

Kubernetes Engine -> Create a Kubernetes cluster -> Node-pools -> default-pool -> Nodes -> Image type.

What you choose will affect what tools you will be able to use internally on the nodes.

Container-Optimized OS

A word about Container-Optimized OS:

Container-Optimized OS is an operating system image for your Compute Engine VMs that is optimized for running Docker containers. With Container-Optimized OS, you can bring up your Docker containers on Google Cloud Platform quickly, efficiently, and securely. Container-Optimized OS is maintained by Google and is based on the open source Chromium OS project.

-- Container-optimized OS

Please take a look on official documentation talking about features, benefits and limitations of Container-Optimized OS: Container-optimized OS features,benefits and limitations

Container-Optimized OS does not include a package manager; as such, you'll be unable to install software packages directly on an instance. However, you can use CoreOS toolbox to install and run debugging and admin tools in an isolated container.

As said in above documentation there is no package manager available but you can use CoreOS toolbox to debug and install required software.

You can check which server is used by your Container-Optimized OS node with systemd as follows:

$ systemctl status systemd-timesyncd

It should give you an output similar to this:

? systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-03-03 21:17:35 UTC; 6 days ago
     Docs: man:systemd-timesyncd.service(8)
 Main PID: 219 (systemd-timesyn)
   Status: "Synchronized to time server ("
    Tasks: 2 (limit: 4915)
   Memory: 832.0K
      CPU: 591ms
   CGroup: /system.slice/systemd-timesyncd.service
           ??219 /usr/lib/systemd/systemd-timesyncd

Please take a specific look on

   Status: "Synchronized to time server ("

Above message indicates which server is used by node to synchronize time.

You can get more information about IP address of by following: What is this IP address

You can check the DNS name of with mentioned CoreOS Toolbox on your node and nslookup:

  • $ /usr/bin/toolbox
  • $ apt-get install -y dnsutils
  • $ nslookup

It should give you an output:


Non-authoritative answer:    name =

Authoritative answers can be found from:

Above output indicates that the address of is the mentioned


With GKE cluster created with Ubuntu image you check NTP information with:

  • systemd
  • dhcp lease
  • ntptrace
  • nslookup


You can check which NTP server is used by your Ubuntu node the same as with Container-Optimized OS as follows:

$ systemctl status systemd-timesyncd

DHCP lease

The DHCP lease contains information about NTP server. You can get information about DHCP lease as follows:

USER@NODE:~$ cat /var/lib/dhcp/dhclient.leases

Output of above command should look like below:

lease {
  interface "eth0";
  fixed-address 10.156.0.X;
  option subnet-mask;
  option routers;
  option dhcp-lease-time 86400;
  option dhcp-message-type 5;
  option domain-name-servers;
  option dhcp-server-identifier;
  option interface-mtu 1460;
  option domain-search "X.internal.", "Y.internal";
  option ntp-servers;
  option rfc3442-classless-static-routes 32,10,156,0,1,0,0,0,0,0,10,156,0,1;
  option host-name "X.internal";
  option domain-name "X.internal";
  renew 2 2020/03/10 09:12:37;
  rebind 2 2020/03/10 18:40:09;
  expire 2 2020/03/10 21:40:09;

Please take a specific look on:

  option ntp-servers;

This line indicates the NTP server used.


Ntptrace should show as follows:

localhost: stratum 3, offset 0.000058, synch distance 0.026242 timed out, nothing received
***Request timed out


You can check the ntp-server with nslookup in the same manner as in CoreOS Toolbox if it matches the

Please let me know if you have any questions in this topic.

  • 2
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags