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 4b34eb33
authored
Jan 07, 2020
by
tingweiwang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete 4-flannel_install.sh
1 parent
c72209ee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
22 deletions
script/k8s/4-flannel_install.sh
script/k8s/4-flannel_install.sh
deleted
100755 → 0
View file @
c72209e
#!/bin/bash
master1_ip
=
192.168.1.32
etcdctl --endpoints
=
https://
$master1_ip
:2379 --ca-file
=
/opt/kubernetes/ssl/ca.pem --cert-file
=
/opt/kubernetes/ssl/etcd.pem --key-file
=
/opt/kubernetes/ssl/etcd-key.pem
set
/coreos.com/network/config
'{ "Network": "172.17.0.0/16", "Backend": {"Type": "vxlan"}}'
cp /root/k8s/bin/mk-docker-opts.sh /opt/kubernetes/bin/
cp /root/k8s/bin/flanneld /opt/kubernetes/bin/
ansible all -m copy -a
"src=/opt/kubernetes/bin/mk-docker-opts.sh dest=/opt/kubernetes/bin/ mode=755"
ansible all -m copy -a
"src=/opt/kubernetes/bin/flanneld dest=/opt/kubernetes/bin/ mode=755"
ansible all -m copy -a
"src=/opt/kubernetes/ssl/etcd.pem dest=/opt/kubernetes/ssl/"
ansible all -m copy -a
"src=/opt/kubernetes/ssl/etcd-key.pem dest=/opt/kubernetes/ssl/"
cat >>/opt/kubernetes/cfg/flanneld
<<EOF
FLANNEL_OPTIONS="--etcd-endpoints=https://$master1_ip:2379 \\
-etcd-cafile=/opt/kubernetes/ssl/ca.pem \\
-etcd-certfile=/opt/kubernetes/ssl/etcd.pem \\
-etcd-keyfile=/opt/kubernetes/ssl/etcd-key.pem \\
--iface=eno1"
EOF
ansible all -m copy -a
"src=/opt/kubernetes/cfg/flanneld dest=/opt/kubernetes/cfg/ mode=755"
cp /root/k8s/service/flanneld.service /lib/systemd/system/
ansible all -m copy -a
"src=/lib/systemd/system/flanneld.service dest=/lib/systemd/system/ mode=755"
ansible all -m shell -a
"systemctl daemon-reload && service flanneld restart && service flanneld status && systemctl enable flanneld.service"
ansible all -m copy -a
"src=/root/k8s/service/docker.service dest=/lib/systemd/system/docker.service mode=755"
ansible all -m shell -a
"systemctl daemon-reload && service docker restart"
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