docker 集群部署的正确方式,避免重启后无No cluster leader
680docker run --name consul1 -d -p 8500:8500 -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8600:8600--restart=alwaysconsul agent -server -bootstrap-expect 2 -ui -bind=0.0.0.0 -client=0.0.0.0681docker insp
·
680 docker run --name consul1 -d -p 8500:8500 -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8600:8600 --restart=always consul agent -server -bootstrap-expect 2 -ui -bind=0.0.0.0 -client=0.0.0.0
681 docker inspect --format '{{.NetworkSettings.IPAddress}}' consul1
682 docker inspect --format '{{.NetworkSettings.IPAddress}}' consul1 | awk '{FS=" "} {print $1}'
683 docker inspect --format '{{.NetworkSettings.IPAddress}}' consul1 | awk '{FS=" "} {print $1}' | xargs -n 1 docker run --name consul2 -d -p 8501:8500 --restart=always consul agent -server -ui -bind=0.0.0.0 -client=0.0.0.0 -join $1
684 docker inspect --format '{{.NetworkSettings.IPAddress}}' consul1 | awk '{FS=" "} {print $1}' | xargs -n 1 docker run --name consul3 -d -p 8502:8500 --restart=always consul agent -server -ui -bind=0.0.0.0 -client=0.0.0.0 -join $1
更多推荐
已为社区贡献4条内容
所有评论(0)