Browse Source

06k8s-install-centos.sh

master
lizw 3 years ago
parent
commit
b62dc9d858
  1. 5
      00base/06k8s-install-centos.sh

5
00base/06k8s-install-centos.sh

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

Loading…
Cancel
Save