问题如图:
虚拟机系统时间与硬件时间均出现错误
电脑时间:
解决方法:
1.手动同步时间
ntpdate cn.pool.ntp.org
2.同步硬件时间
hwclock -w
3.修改 /etc/sysconfig/ntpd 文件,添加 -L 选项
# Command line options for ntpd
OPTIONS="-g -L"
分析原因:
查看日志
[root@k8s-node02 ~]# cat /var/log/messages | grep ntpd
Mar 9 22:13:12 k8s-node02 ntpd[39053]: ntpd [email protected] Tue Jun 23 15: