Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tingweiwang
/
k8s
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a09e0b5a
authored
Aug 24, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scp 密钥时通过for 循环实现新添加的多node节点拷贝
1 parent
896e5757
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
script/k8s/add_node.sh
script/k8s/add_node.sh
View file @
a09e0b5
...
@@ -28,7 +28,10 @@ cat /etc/ansible/hosts && sleep 6
...
@@ -28,7 +28,10 @@ cat /etc/ansible/hosts && sleep 6
########################执行初始化脚本以及配置##########################################
########################执行初始化脚本以及配置##########################################
ansible new_node -m script -a
"/root/k8s/script/k8s/backup/1-init.sh"
ansible new_node -m script -a
"/root/k8s/script/k8s/backup/1-init.sh"
ansible new_node -m shell -a
"mkdir /opt/kubernetes/{cfg,bin,ssl,log} -pv"
ansible new_node -m shell -a
"mkdir /opt/kubernetes/{cfg,bin,ssl,log} -pv"
scp /opt/kubernetes/ssl/ca
*
$new_node
:/opt/kubernetes/ssl/
for
ip2
in
${
new_node
[@]
}
do
scp /opt/kubernetes/ssl/ca
*
$ip2
:/opt/kubernetes/ssl/
done
#########################################flannel########################################
#########################################flannel########################################
ansible new_node -m copy -a
"src=/opt/kubernetes/bin/mk-docker-opts.sh dest=/opt/kubernetes/bin/ mode=755"
ansible new_node -m copy -a
"src=/opt/kubernetes/bin/mk-docker-opts.sh dest=/opt/kubernetes/bin/ mode=755"
ansible new_node -m copy -a
"src=/opt/kubernetes/bin/flanneld dest=/opt/kubernetes/bin/ mode=755"
ansible new_node -m copy -a
"src=/opt/kubernetes/bin/flanneld dest=/opt/kubernetes/bin/ mode=755"
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment