mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Merge pull request #5656 from lhuard1A/libvirt-coreos_etcd-HA
libvirt-coreos: make kube-apiserver connect to all the etcd nodes of the cluster
This commit is contained in:
commit
407af7b883
@ -16,7 +16,7 @@ coreos:
|
|||||||
ExecStart=/opt/kubernetes/bin/kube-apiserver \
|
ExecStart=/opt/kubernetes/bin/kube-apiserver \
|
||||||
--address=0.0.0.0 \
|
--address=0.0.0.0 \
|
||||||
--port=8080 \
|
--port=8080 \
|
||||||
--etcd_servers=http://127.0.0.1:4001 \
|
--etcd_servers=${etcd_servers} \
|
||||||
--kubelet_port=10250 \
|
--kubelet_port=10250 \
|
||||||
--portal_net=${PORTAL_NET}
|
--portal_net=${PORTAL_NET}
|
||||||
Restart=always
|
Restart=always
|
||||||
|
@ -191,6 +191,12 @@ function kube-up {
|
|||||||
|
|
||||||
readonly machines=$(join , "${KUBE_MINION_IP_ADDRESSES[@]}")
|
readonly machines=$(join , "${KUBE_MINION_IP_ADDRESSES[@]}")
|
||||||
|
|
||||||
|
etcd_servers=( $MASTER_IP ${MINION_IPS[@]} )
|
||||||
|
for (( i=0; i<${#etcd_servers[@]}; i++ )); do
|
||||||
|
etcd_servers[$i]=http://${etcd_servers[$i]}:4001
|
||||||
|
done
|
||||||
|
etcd_servers=$(join , ${etcd_servers[@]})
|
||||||
|
|
||||||
local i
|
local i
|
||||||
for (( i = 0 ; i <= $NUM_MINIONS ; i++ )); do
|
for (( i = 0 ; i <= $NUM_MINIONS ; i++ )); do
|
||||||
if [[ $i -eq $NUM_MINIONS ]]; then
|
if [[ $i -eq $NUM_MINIONS ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user