mirror of https://github.com/k3s-io/k3s
Add cleanup function to make the build.sh more robust
parent
c80ef5de60
commit
ca16a57b54
|
@ -17,9 +17,15 @@
|
|||
# Download the etcd, flannel, and K8s binaries automatically
|
||||
# Run as root only
|
||||
|
||||
# author @resouer
|
||||
# author @resouer @WIZARD-CXY
|
||||
set -e
|
||||
|
||||
function cleanup {
|
||||
# cleanup work
|
||||
rm -rf flannel kubernetes* etcd* binaries
|
||||
}
|
||||
trap cleanup SIGHUP SIGINT SIGTERM
|
||||
|
||||
# check root
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo >&2 "Please run as root"
|
||||
|
|
|
@ -11,7 +11,7 @@ This document describes how to deploy kubernetes on multiple ubuntu nodes, inclu
|
|||
|
||||
*3 These guide is tested OK on Ubuntu 14.04 LTS 64bit server, but it should also work on most Ubuntu versions*
|
||||
|
||||
*4 Dependences of this guide: etcd-2.0.0, flannel-0.2.0, k8s-0.10.1, but it should also work on higher versions*
|
||||
*4 Dependences of this guide: etcd-2.0.0, flannel-0.2.0, k8s-0.12.0, but it may work with higher versions*
|
||||
|
||||
|
||||
### **Main Steps**
|
||||
|
@ -21,7 +21,7 @@ On your laptop, copy `cluster/ubuntu-cluster` directory to your workspace.
|
|||
|
||||
The `build.sh` will download and build all the needed binaries into `./binaries`.
|
||||
|
||||
You can customize your etcd version or K8s version in the build.sh by changing variable `ETCD_V` and `K8S_V`, default etcd version is 2.0.0 and K8s version is 0.12.0.
|
||||
You can customize your etcd version or K8s version in the build.sh by changing variable `ETCD_V` and `K8S_V` in build.sh, default etcd version is 2.0.0 and K8s version is 0.12.0.
|
||||
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue