cluster提交
This commit is contained in:
parent
adb0301f61
commit
853932b43d
12
cluster.env
Normal file
12
cluster.env
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# master 节点的IP
|
||||||
|
MASTER1="10.0.0.11"
|
||||||
|
MASTER2="10.0.0.12"
|
||||||
|
MASTER3="10.0.0.13"
|
||||||
|
|
||||||
|
# master 节点的网卡设备名
|
||||||
|
MASTER1_NIC="eth0"
|
||||||
|
MASTER2_NIC="eth0"
|
||||||
|
MASTER3_NIC="eth0"
|
||||||
|
|
||||||
|
# api server 填vip或者负载均衡的地址
|
||||||
|
API_SERVER="10.0.0.10"
|
15
cluster.sh
Executable file
15
cluster.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
source cluster.env
|
||||||
|
|
||||||
|
if [ $(id -u) != "0" ]; then
|
||||||
|
echo "Error: You must be root to run this script"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd scripts
|
||||||
|
./1-init.sh
|
||||||
|
sed -e "s/^apiserver=.*/apiserver=${VIP}/g" -i 2-create_k8s.sh
|
||||||
|
./2-create_k8s.sh
|
||||||
|
./3-nginx_ingress.sh
|
Loading…
Reference in New Issue
Block a user