K8S主机环境配置(一)


#主机环境

#hostnamectl status 
Static hostname: k8s-master
Icon name: computer-vm
Chassis: vm
Machine ID: 60943b8b8b72471c82b7e50337e0ab9e
Boot ID: d5e57a99d1f64214a53f7954567ebf00
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 4.4.220-1.el7.elrepo.x86_64
Architecture: x86-64

# 设置主机名

# hostnamectl set-hostname k8s-master
# hostnamectl status
# 设置时区
# timedatectl set-timezone Asia/Shanghai
# timedatectl set-local-rtc 0
# timedatectl set-ntp true

# 重启时钟依赖的服务
# systemctl restart rsyslog
# systemctl restart crond

# 界面配置
# nmtui

# nmcli connection show 显示指定网口的信息
# nmcli connection show eno33554960

#显示所有设配状态
# nmcli device status#添加ipv4
# nmcli connection modify eth0 +ipv4.addresses 3.3.3.7/24 #添加DNS
# nmcli connection modify eth0 ipv4.dns 114.114.114.114 #添加一个网关(GATEWAY)
# nmcli connection modify eth0 ipv4.gateway 3.3.3.254 #一块写入:
# nmcli connection modify eth0 ipv4.dns 114.114.114.114 +ipv4.gateway 3.3.3.254


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM