VMware Tanzu Kubernetes Grid Integrated Edition (TKGI)
To update a new NTP server IP address on the control plane:
Note: The above steps will update the NTP on bosh, tkgi and harbor vm. However, this will not update on the service-instances as opsman does not have control of it.
In order to update NTP IP address on the cluster nodes, follow the below steps.
1. Export the manifest file for the cluster by running the below command.
bosh -d <service-instance_ID> manifest ><service-instance_ID>.yml
2. Redeploy the cluster by running the below command. This command will recreate the cluster.
bosh -d <service-instance_ID> deploy <service-instance_ID>.yml --recreate
Once the changes are applied successfully, you may ssh into the nodes and validate by running the below commands.
Alternative method to VM recreation: In case the recreation of the worker and master nodes of clusters is not desired at the time (after just completed upgrade or in order to minimise the downtime), the clusters can be manually updated with the steps below:
If the VMs are recreated by Bosh Resurrector or the stemcell upgrade is planned, then the NTP configuration will be applied during the recreation, so this alternative method can be beneficial in such cases.
However it should be noted that the NTP will not persist until the VMs have been recreated. If the cluster is redeployed without "recreate" the NTP configuration from Bosh Director will not be applied and the below configuration will be lost.
Create a file with NTP servers add the servers into the file the ntp servers should match the Bosh tile > Director Config :
$ cat ntpserver
ntp.example.com
Upload the file to the cluster :
bosh -d service-instance_<ID> scp ntpserver :/tmp/.
Copy the new file to the correct path:
bosh -d service-instance_<ID> ssh -c "sudo cp /tmp/ntpserver /var/vcap/bosh/etc/"
Execute the sync-time script:
bosh -d service-instance_<ID> ssh -c "sudo /var/vcap/bosh/bin/sync-time"
Verify new NTP servers are taking place:
bosh -d service-instance_<ID> ssh -c "sudo chronyc sources" | grep stdout
master/<ID>: stdout | MS Name/IP address Stratum Poll Reach LastRx Last sample
worker/<ID>: stdout | ^* ntp.example.com 2 6 377 4 +276us[ +311us] +/- 28ms
worker/<ID>: stdout | ^* ntp.example.com 2 6 377 3 -18ms[ -21ms] +/- 159ms
master/<ID>: stdout | ^* ntp.example.com 2 6 377 3 +952us[ +996us] +/- 45ms
Alternatively trigger burst of sync ntp operations and check the status:
bosh -d service-instance_<ID> ssh -c "sudo chronyc burst 4/4 ; sudo chronyc sources"