当前位置: 首页 > article >正文

k8s集群环境时间同步

k8s集群环境时间同步

ntp.test.org域名是解析到ntp服务器


# 对于 Ubuntu/Debian
sudo apt update
sudo apt install chrony
# 对于 CentOS/RHEL
sudo yum install chrony

```

/etc/chrony.conf加server ntp.test.org iburst  这一行,ntp服务器

[root@master-15d62-0 ~]# cat /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
pool pool.ntp.org iburst

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3

# Enable kernel synchronization of the real-time clock (RTC).
rtcsync

# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2

# Allow NTP client access from local network.
#allow 192.168.0.0/16

# Serve time even if not synchronized to a time source.
local stratum 10

# Specify file containing keys for NTP authentication.
#keyfile /etc/chrony.keys

# Get TAI-UTC offset and leap seconds from the system tz database.
#leapsectz right/UTC

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
#log measurements statistics tracking
allow 0.0.0.0/0

server ntp.test.org iburst

```

systemctl restart chronyd.service


http://www.kler.cn/a/429067.html

相关文章:

  • python编程-OpenCV(图像读写-图像处理-图像滤波-角点检测-边缘检测)边缘检测
  • MySQL 数据库 :SQL 语句规约(不得使用外键与级联,一切外键概念必须在应用层解决。)
  • 国产编辑器EverEdit - 复制为RTF
  • TinyEngine v2.1版本发布:全新的区块方案和画布通信方案,打造更强力的可拓展低代码引擎
  • IP层之分片包的整合处理
  • BIO、NIO、AIO
  • Ethernet 系列(10)-- 基础学习::UDP
  • 突破空间限制!从2D到3D:北大等开源Lift3D,助力精准具身智能操作!
  • 【Linux系统】Ubuntu 缓冲区机制
  • 【在Linux世界中追寻伟大的One Piece】HTTP cookie
  • NDK编译(使用Android.mk)C/C++程序和库
  • pytest(三)json数据驱动
  • flutter实现如何 检测键盘的显示和隐藏状态
  • Github 2024-12-05 Go开源项目日报 Top10
  • 【C++boost::asio网络编程】有关处理粘包问题的笔记
  • dockers网络连接指令:docker network connect
  • 数据结构初阶---链表(2)---双向链表
  • Vue 组件通信全面解析
  • 【text2sql】低资源场景下Text2SQL方法
  • 【CKS最新模拟真题】从ETCD 中读取 Secret的键值
  • mac电脑安装hadoop、hive等大数据组件
  • 计算机病毒的特效及种类【知识点+逐字稿+答辩题】----高中信息技术教资面试
  • 设计模式10:观察者模式(订阅-发布)
  • 朗新科技集团如何用云消息队列 RocketMQ 版“快、准、狠”破解业务难题?
  • 生活大爆炸版石头剪刀布(洛谷P1328)
  • SpringBoot 赋能:精铸超稳会员制医疗预约系统,夯实就医数据根基