mirror of https://github.com/k3s-io/k3s
fix etcd flag for ubuntu
parent
d069a624ac
commit
5ebff99dbf
|
@ -188,8 +188,8 @@ function create-etcd-opts() {
|
|||
cat <<EOF > ~/kube/default/etcd
|
||||
ETCD_OPTS="\
|
||||
-name infra\
|
||||
-listen-client-urls http://0.0.0.0:4001\
|
||||
-advertise-client-urls http://127.0.0.1:4001"
|
||||
-listen-client-urls http://127.0.0.1:4001,http://${1}:4001\
|
||||
-advertise-client-urls http://${1}:4001"
|
||||
EOF
|
||||
}
|
||||
|
||||
|
@ -379,7 +379,7 @@ function provision-master() {
|
|||
source ~/kube/util.sh
|
||||
|
||||
setClusterInfo
|
||||
create-etcd-opts
|
||||
create-etcd-opts '${MASTER_IP}'
|
||||
create-kube-apiserver-opts \
|
||||
'${SERVICE_CLUSTER_IP_RANGE}' \
|
||||
'${ADMISSION_CONTROL}' \
|
||||
|
@ -481,7 +481,7 @@ function provision-masterandnode() {
|
|||
source ~/kube/util.sh
|
||||
|
||||
setClusterInfo
|
||||
create-etcd-opts
|
||||
create-etcd-opts '${MASTER_IP}'
|
||||
create-kube-apiserver-opts \
|
||||
'${SERVICE_CLUSTER_IP_RANGE}' \
|
||||
'${ADMISSION_CONTROL}' \
|
||||
|
|
|
@ -70,7 +70,7 @@ across reboots and failures.
|
|||
Run:
|
||||
|
||||
```sh
|
||||
sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host -d gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd --listen-client-urls=http://127.0.0.1:4001,http://${MASTER_IP}:4001 --advertise-client-urls=http://127.0.0.1:4001,http://${MASTER_IP}:4001 --data-dir=/var/etcd/data
|
||||
sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host -d gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd --listen-client-urls=http://127.0.0.1:4001,http://${MASTER_IP}:4001 --advertise-client-urls=http://${MASTER_IP}:4001 --data-dir=/var/etcd/data
|
||||
```
|
||||
|
||||
Next, you need to set a CIDR range for flannel. This CIDR should be chosen to be non-overlapping with any existing network you are using:
|
||||
|
|
|
@ -121,7 +121,7 @@ start_k8s(){
|
|||
gcr.io/google_containers/etcd:2.2.1 \
|
||||
/usr/local/bin/etcd \
|
||||
--listen-client-urls=http://127.0.0.1:4001,http://${MASTER_IP}:4001 \
|
||||
--advertise-client-urls=http://127.0.0.1:4001,http://${MASTER_IP}:4001
|
||||
--advertise-client-urls=http://${MASTER_IP}:4001
|
||||
--data-dir=/var/etcd/data
|
||||
|
||||
sleep 5
|
||||
|
|
Loading…
Reference in New Issue