diff --git a/00base/06k8s-install-centos.sh b/00base/06k8s-install-centos.sh index a97b3d3..369c12a 100644 --- a/00base/06k8s-install-centos.sh +++ b/00base/06k8s-install-centos.sh @@ -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