Commit e7615518 by tingweiwang

Flannel网卡采用正则

1 parent a765683e
Showing with 2 additions and 2 deletions
...@@ -5,7 +5,7 @@ harbor_host=192.168.1.56:5000 ...@@ -5,7 +5,7 @@ harbor_host=192.168.1.56:5000
new_node=( new_node=(
192.168.1.58 192.168.1.58
) #可以写多个node。每行一个。 ) #可以写多个node。每行一个。
interface=eno1 interface='eth*|enp*|eno*|ens*'
###############配置节点免密########################################################### ###############配置节点免密###########################################################
port=22 port=22
password=seetatech password=seetatech
...@@ -41,7 +41,7 @@ cat >>/opt/kubernetes/cfg/flanneld.$new_node<<EOF ...@@ -41,7 +41,7 @@ cat >>/opt/kubernetes/cfg/flanneld.$new_node<<EOF
FLANNEL_OPTIONS="--etcd-endpoints=https://$etcd_ip:2379 \\ FLANNEL_OPTIONS="--etcd-endpoints=https://$etcd_ip:2379 \\
-etcd-cafile=/opt/kubernetes/ssl/ca.pem \\ -etcd-cafile=/opt/kubernetes/ssl/ca.pem \\
-etcd-certfile=/opt/kubernetes/ssl/etcd.pem \\ -etcd-certfile=/opt/kubernetes/ssl/etcd.pem \\
--iface=$interface \\ --iface-regex==$interface \\
-etcd-keyfile=/opt/kubernetes/ssl/etcd-key.pem" -etcd-keyfile=/opt/kubernetes/ssl/etcd-key.pem"
EOF EOF
ansible new_node -m copy -a "src=/opt/kubernetes/cfg/flanneld.$new_node dest=/opt/kubernetes/cfg/flanneld mode=755" ansible new_node -m copy -a "src=/opt/kubernetes/cfg/flanneld.$new_node dest=/opt/kubernetes/cfg/flanneld mode=755"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!