Add default version to scripts

This commit is contained in:
harry 2015-09-07 14:16:45 +08:00 committed by Harry Zhang
parent 8cc75a4734
commit 365562c0b9
3 changed files with 13 additions and 6 deletions

View File

@ -74,6 +74,14 @@ This pattern is necessary because the `flannel` daemon is responsible for settin
all of the Docker containers created by Kubernetes. To achieve this, it must run outside of the _main_ Docker daemon. However,
it is still useful to use containers for deployment and management, so we create a simpler _bootstrap_ daemon to achieve this.
You can specify k8s version on very node before install:
```
export K8S_VERSION=<your_k8s_version (e.g. 1.0.3)>
```
Otherwise, we'll use latest `hyperkube` image as default k8s version.
## Master Node
The first step in the process is to initialize the master node.
@ -81,7 +89,6 @@ 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
export K8S_VERSION=<your_k8s_version (e.g. 1.0.1)>
cd kubernetes/docs/getting-started-guides/docker-multinode/
./master.sh
```
@ -97,7 +104,6 @@ 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 K8S_VERSION=<your_k8s_version (e.g. 1.0.1)>
export MASTER_IP=<your_master_ip (e.g. 1.2.3.4)>
cd kubernetes/docs/getting-started-guides/docker-multinode/
./worker.sh

View File

@ -27,8 +27,8 @@ fi
# Make sure k8s version env is properly set
if [ -z ${K8S_VERSION} ]; then
echo "Please export K8S_VERSION in your env"
exit 1
K8S_VERSION="1.0.3"
echo "K8S_VERSION is not set, using default: ${K8S_VERSION}"
else
echo "k8s version is set to: ${K8S_VERSION}"
fi

View File

@ -27,13 +27,14 @@ fi
# Make sure k8s version env is properly set
if [ -z ${K8S_VERSION} ]; then
echo "Please export K8S_VERSION in your env"
exit 1
K8S_VERSION="1.0.3"
echo "K8S_VERSION is not set, using default: ${K8S_VERSION}"
else
echo "k8s version is set to: ${K8S_VERSION}"
fi
# Run as root
if [ "$(id -u)" != "0" ]; then
echo >&2 "Please run as root"