linux基础
ansible批量更改密码
# cat play.yml --- - hosts: test #ansible的hosts子组 gather_facts: false tasks: - name: change user passwd user: name={{ item.name }} password={{ item.chpass | password_hash('sha512') }} update_password=always with_items: - { name: 'root', chpass: 'admin#123' } - { name: 'test', chpass: 'yjun@123' }
抓包
https://www.wireshark.org/download.html
tcpdump -i any -nn host 192.168.192.151
tcpdump -i any -nn host 192.168.192.151 -w k8s.cap
ntp配置
k8s中各微服务需要时间一致,因此k8s node节点需要配置ntp保证时间一致
root@IP1:~>cat ntp.conf |grep -v "#" |grep -v "^$"
driftfile /var/lib/ntp/drift
restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
disable monitor
server IP2
logfile /var/log/ntp.log
root@T180PC06VM63:~>cat /etc/ntp.conf |grep -v "#" |grep -v "^$"
driftfile /var/lib/ntp/drift
restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
disable monitor
server IP-ntp服务器
logfile /var/log/ntp.log
重启ntp服务成效