mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Merge pull request #17422 from ZJU-SEL/upgrade-etcd-flag
Auto commit by PR queue bot
This commit is contained in:
commit
8d60aae8ff
@ -88,9 +88,10 @@ The first step in the process is to initialize the master node.
|
||||
|
||||
Clone the Kubernetes repo, and run [master.sh](docker-multinode/master.sh) on the master machine with root:
|
||||
|
||||
```sh
|
||||
cd kubernetes/docs/getting-started-guides/docker-multinode/
|
||||
./master.sh
|
||||
```console
|
||||
$ export MASTER_IP=<your_master_ip (e.g. 1.2.3.4)>
|
||||
$ cd kubernetes/docs/getting-started-guides/docker-multinode/
|
||||
$ ./master.sh
|
||||
```
|
||||
|
||||
`Master done!`
|
||||
@ -103,10 +104,10 @@ Once your master is up and running you can add one or more workers on different
|
||||
|
||||
Clone the Kubernetes repo, and run [worker.sh](docker-multinode/worker.sh) on the worker machine with root:
|
||||
|
||||
```sh
|
||||
export MASTER_IP=<your_master_ip (e.g. 1.2.3.4)>
|
||||
cd kubernetes/docs/getting-started-guides/docker-multinode/
|
||||
./worker.sh
|
||||
```console
|
||||
$ export MASTER_IP=<your_master_ip (e.g. 1.2.3.4)>
|
||||
$ cd kubernetes/docs/getting-started-guides/docker-multinode/
|
||||
$ ./worker.sh
|
||||
```
|
||||
|
||||
`Worker done!`
|
||||
|
@ -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 --addr=127.0.0.1:4001 --bind-addr=0.0.0.0: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://127.0.0.1:4001,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:
|
||||
|
@ -39,6 +39,14 @@ if [ "$(id -u)" != "0" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure master ip is properly set
|
||||
if [ -z ${MASTER_IP} ]; then
|
||||
echo "Please export MASTER_IP in your env"
|
||||
exit 1
|
||||
else
|
||||
echo "k8s master is set to: ${MASTER_IP}"
|
||||
fi
|
||||
|
||||
# Check if a command is valid
|
||||
command_exists() {
|
||||
command -v "$@" > /dev/null 2>&1
|
||||
@ -112,8 +120,8 @@ start_k8s(){
|
||||
-d \
|
||||
gcr.io/google_containers/etcd:2.2.1 \
|
||||
/usr/local/bin/etcd \
|
||||
--addr=127.0.0.1:4001 \
|
||||
--bind-addr=0.0.0.0:4001 \
|
||||
--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
|
||||
|
||||
sleep 5
|
||||
|
@ -89,7 +89,7 @@ parameters as follows:
|
||||
### Step One: Run etcd
|
||||
|
||||
```sh
|
||||
docker run --net=host -d gcr.io/google_containers/etcd:2.2.1 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data
|
||||
docker 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 --advertise-client-urls=http://127.0.0.1:4001 --data-dir=/var/etcd/data
|
||||
```
|
||||
|
||||
### Step Two: Run the master
|
||||
|
Loading…
Reference in New Issue
Block a user