mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 03:03:40 +00:00
Update etcd to 2.2.1
This commit is contained in:
@@ -68,13 +68,13 @@ 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.0.12 /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 --addr=127.0.0.1:4001 --bind-addr=0.0.0.0: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:
|
||||
|
||||
```sh
|
||||
sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host gcr.io/google_containers/etcd:2.0.12 etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16" }'
|
||||
sudo docker -H unix:///var/run/docker-bootstrap.sock run --net=host gcr.io/google_containers/etcd:2.2.1 etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16" }'
|
||||
```
|
||||
|
||||
|
||||
|
@@ -98,11 +98,11 @@ DOCKER_CONF=""
|
||||
|
||||
start_k8s(){
|
||||
# Start etcd
|
||||
docker -H unix:///var/run/docker-bootstrap.sock run --restart=always --net=host -d gcr.io/google_containers/etcd:2.0.12 /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data
|
||||
docker -H unix:///var/run/docker-bootstrap.sock run --restart=always --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
|
||||
|
||||
sleep 5
|
||||
# Set flannel net config
|
||||
docker -H unix:///var/run/docker-bootstrap.sock run --net=host gcr.io/google_containers/etcd:2.0.12 etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16", "Backend": {"Type": "vxlan"}}'
|
||||
docker -H unix:///var/run/docker-bootstrap.sock run --net=host gcr.io/google_containers/etcd:2.2.1 etcdctl set /coreos.com/network/config '{ "Network": "10.1.0.0/16", "Backend": {"Type": "vxlan"}}'
|
||||
|
||||
# iface may change to a private network interface, eth0 is for default
|
||||
flannelCID=$(docker -H unix:///var/run/docker-bootstrap.sock run --restart=always -d --net=host --privileged -v /dev/net:/dev/net quay.io/coreos/flannel:0.5.3 /opt/bin/flanneld -iface="eth0")
|
||||
|
@@ -86,7 +86,7 @@ parameters as follows:
|
||||
### Step One: Run etcd
|
||||
|
||||
```sh
|
||||
docker run --net=host -d gcr.io/google_containers/etcd:2.0.12 /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 --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data
|
||||
```
|
||||
|
||||
### Step Two: Run the master
|
||||
|
@@ -107,7 +107,7 @@ Start etcd and verify that it is running:
|
||||
|
||||
```bash
|
||||
sudo docker run -d --hostname $(uname -n) --name etcd \
|
||||
-p 4001:4001 -p 7001:7001 quay.io/coreos/etcd:v2.0.12 \
|
||||
-p 4001:4001 -p 7001:7001 quay.io/coreos/etcd:v2.2.1 \
|
||||
--listen-client-urls http://0.0.0.0:4001 \
|
||||
--advertise-client-urls http://${KUBERNETES_MASTER_IP}:4001
|
||||
```
|
||||
@@ -115,7 +115,7 @@ sudo docker run -d --hostname $(uname -n) --name etcd \
|
||||
```console
|
||||
$ sudo docker ps
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
fd7bac9e2301 quay.io/coreos/etcd:v2.0.12 "/etcd" 5s ago Up 3s 2379/tcp, 2380/... etcd
|
||||
fd7bac9e2301 quay.io/coreos/etcd:v2.2.1 "/etcd" 5s ago Up 3s 2379/tcp, 2380/... etcd
|
||||
```
|
||||
|
||||
It's also a good idea to ensure your etcd instance is reachable by testing it
|
||||
|
@@ -237,8 +237,8 @@ You have several choices for Kubernetes images:
|
||||
command like `docker images`
|
||||
|
||||
For etcd, you can:
|
||||
- Use images hosted on Google Container Registry (GCR), such as `gcr.io/google_containers/etcd:2.0.12`
|
||||
- Use images hosted on [Docker Hub](https://hub.docker.com/search/?q=etcd) or [Quay.io](https://quay.io/repository/coreos/etcd), such as `quay.io/coreos/etcd:v2.2.0`
|
||||
- Use images hosted on Google Container Registry (GCR), such as `gcr.io/google_containers/etcd:2.2.1`
|
||||
- Use images hosted on [Docker Hub](https://hub.docker.com/search/?q=etcd) or [Quay.io](https://quay.io/repository/coreos/etcd), such as `quay.io/coreos/etcd:v2.2.1`
|
||||
- Use etcd binary included in your OS distro.
|
||||
- Build your own image
|
||||
- You can do: `cd kubernetes/cluster/images/etcd; make`
|
||||
|
@@ -60,7 +60,7 @@ work, which has been merge into this document.
|
||||
Internet to download the necessary files, while worker nodes do not.
|
||||
3. These guide is tested OK on Ubuntu 14.04 LTS 64bit server, but it can not work with
|
||||
Ubuntu 15 which uses systemd instead of upstart.
|
||||
4. Dependencies of this guide: etcd-2.0.12, flannel-0.5.3, k8s-1.0.6, may work with higher versions.
|
||||
4. Dependencies of this guide: etcd-2.2.1, flannel-0.5.3, k8s-1.0.6, may work with higher versions.
|
||||
5. All the remote servers can be ssh logged in without a password by using key authentication.
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ $ git clone https://github.com/kubernetes/kubernetes.git
|
||||
#### Configure and start the Kubernetes cluster
|
||||
|
||||
The startup process will first download all the required binaries automatically.
|
||||
By default etcd version is 2.0.12, flannel version is 0.5.3 and k8s version is 1.0.6.
|
||||
By default etcd version is 2.2.1, flannel version is 0.5.3 and k8s version is 1.0.6.
|
||||
You can customize your etcd version, flannel version, k8s version by changing corresponding variables
|
||||
`ETCD_VERSION` , `FLANNEL_VERSION` and `KUBE_VERSION` like following.
|
||||
|
||||
|
Reference in New Issue
Block a user