|
@@ -2095,7 +2095,7 @@ function add::ingress() {
|
|
|
sudo service nginx start
|
|
|
cat << EOF > /etc/nginx/conf.d/k8s.ingress.conf
|
|
|
upstream k8s-ingress {
|
|
|
- $(for h in MASTER_NODES $WORKER_NODES;do echo "server $h:30080 max_fails=1 fail_timeout=15s;";done)
|
|
|
+$(for h in $MASTER_NODES $WORKER_NODES;do echo " server $h:30080 max_fails=1 fail_timeout=15s;";done)
|
|
|
keepalive 128;
|
|
|
}
|
|
|
|
|
@@ -2148,8 +2148,8 @@ function add::ui() {
|
|
|
# 安装 rancher
|
|
|
log::info "[rancher]" "add rancher"
|
|
|
command::exec "${MGMT_NODE}" "
|
|
|
- helm repo add rancher-stable http://rancher-mirror.oss-cn-beijing.aliyuncs.com/server-charts/stable
|
|
|
cd ${path}
|
|
|
+ helm repo add rancher-stable http://rancher-mirror.oss-cn-beijing.aliyuncs.com/server-charts/stable
|
|
|
helm pull rancher-stable/rancher --version ${RANCHER_VERSION} --untar
|
|
|
cat << EOF > rancher/templates/service.yaml
|
|
|
apiVersion: v1
|
|
@@ -2159,6 +2159,7 @@ metadata:
|
|
|
labels:
|
|
|
{{ include \"rancher.labels\" . | indent 4 }}
|
|
|
spec:
|
|
|
+ type: NodePort
|
|
|
ports:
|
|
|
- port: 80
|
|
|
targetPort: 80
|