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 a74a266a
authored
Aug 15, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix add_node
1 parent
27416575
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
script/k8s/add_node.sh
script/k8s/add_node.sh
View file @
a74a266
...
...
@@ -2,12 +2,14 @@
etcd_ip
=
192.168.1.56
master_ip
=
192.168.1.56
harbor_host
=
192.168.1.56:5000
new_node
=
192.168.1.58
new_node
=(
192.168.1.58
)
#可以写多个node。每行一个。
interface
=
eno1
#########################################################sshpass
port
=
22
password
=
seetatech
for
ip
in
$
new_node
for
ip
in
$
{
new_node
[@]
}
do
sshpass -p
$password
ssh-copy-id -i ~/.ssh/id_rsa.pub -p
$port
-o
StrictHostKeyChecking
=
no root@
$ip
done
...
...
@@ -85,7 +87,7 @@ kubectl config use-context default --kubeconfig=bootstrap.kubeconfig
ansible new_node -m copy -a
"src=/root/k8s/script/k8s/bootstrap.kubeconfig dest=/opt/kubernetes/cfg/ mode=644"
ansible new_node -m copy -a
"src=/opt/kubernetes/cfg/token.csv dest=/opt/kubernetes/cfg/"
##############################################################################################
for
new_node_ip
in
$
new_node
for
new_node_ip
in
$
{
new_node
[@]
}
do
cat >>/opt/kubernetes/cfg/kubelet.
$new_node_ip
<<EOF
KUBELET_OPTS="--logtostderr=false \
...
...
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