1.主机名配置
由于本次使用3台主机完成kubernetes集群部署,其中1台为master节点,名称为k8s-master01;其中2台为workoer 节点,名称分别为:k8s-worker01及k8s-worker02
master节点
hostnamectl set-hostname k8s-master01
Worker01节点
hostnamectl set-hostname k8s-worker01
Worker02节点
hostnamectl set-hostname k8s-worker02p
配置网络IP
master节点配置IP
vim /etc/netplan/01-network-manager-all.yamlb
编辑
network: ethernets: ens33: addresses: - 192.168.113.131/24 # gateway4: 192.168.168.2 # 以前的网关 , 可用,但会提示不赞成 routes: - to: default # default 等效 0.0.0.0/0 等效 0/0 # could be 0/0 or 0.0.0.0/0 optionally via: 192.168.113.2 # 网关 nameservers: addresses: # DNS的ip - 8.8.8.8 # 谷歌 - 8.8.4.4 # 谷歌 - 1.1.1.1 - 223.6.6.6 # 阿里 - 114.114.114.114 - 180.76.76.76 # 百度 - 119.29.29.29 # 腾讯 - 101.226.4.6 - 123.125.81.6
标签:set,kubernetes,0.0,192.168,企业级,Ubuntu,hostnamectl,k8s,节点 From: https://www.cnblogs.com/xu53105656/p/18383278