Selaa lähdekoodia

06k8s-install-centos.sh

lizw 2 vuotta sitten
vanhempi
commit
b62dc9d858
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      00base/06k8s-install-centos.sh

+ 3 - 2
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