Skip to content

Commit

Permalink
Fix Kubernetes install script
Browse files Browse the repository at this point in the history
  • Loading branch information
rootsongjc committed Dec 29, 2018
1 parent 0f5c75f commit 1222fbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ git clone https://github.com/rootsongjc/kubernetes-vagrant-centos-cluster.git
cd kubernetes-vagrant-centos-cluster
```

注:如果您是第一次运行该部署程序,那么可以直接执行下面的命令,它将自动帮你下载 Kubernetes 安装包,下一次你就不需要自己下载了,另外您也可以在[这里](https://kubernetes.io/docs/imported/release/notes/)找到Kubernetes的发行版下载地址,下载 Kubernetes发行版后重命名为`kubernetes-server-linux-amd64.tar.gz`,并移动到该项目的根目录下。
**注意**:如果您是第一次运行该部署程序,那么可以直接执行下面的命令,它将自动帮你下载 Kubernetes 安装包,下一次你就不需要自己下载了,另外您也可以在[这里](https://kubernetes.io/docs/imported/release/notes/)找到Kubernetes的发行版下载地址,下载 Kubernetes发行版后重命名为`kubernetes-server-linux-amd64.tar.gz`,并移动到该项目的根目录下。

因为该项目是使用 NFS 的方式挂载到虚拟机的 `/vagrant` 目录中的,所以在安装 NFS 的时候需要您输入密码授权。

使用vagrant启动集群。

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ cd kubernetes-vagrant-centos-cluster

**Note**: If this your first time to setup Kubernetes cluster with vagrant, just skip the above step and run the following command, it will download Kubernetes release automatically for you and no need to download the release next time. You can find the download address the Kubernetes releases [here](https://kubernetes.io/docs/imported/release/notes/). Download the release of version you wanted, move it to the root of this repo, rename it to `kubernetes-server-linux-amd64.tar.gz` then the `install.sh` script will skip the download step.

As this repo folder is mounted to `/vagrant` with NFS in virtual machines, you may be required to enter a password to for administrator privileges during the installation.

Set up Kubernetes cluster with vagrant.

```bash
Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ mv /etc/yum.repos.d/CentOS7-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo
# using socat to port forward in helm tiller
# install kmod and ceph-common for rook
yum install -y wget curl conntrack-tools vim net-tools telnet tcpdump bind-utils socat ntp kmod ceph-common dos2unix
kubernetes_release="kubernetes-server-linux-amd64.tar.gz"
kubernetes_release="/vagrant/kubernetes-server-linux-amd64.tar.gz"
# Download Kubernetes
if [[ $(hostname) = "node1"] && [ ! -f "$kubernetes_release" ]]; then
if [[ $(hostname) == "node1" ]] && [[ ! -f "$kubernetes_release" ]]; then
wget https://storage.googleapis.com/kubernetes-release/release/v1.11.0/kubernetes-server-linux-amd64.tar.gz -P /vagrant/
fi

Expand Down

0 comments on commit 1222fbe

Please sign in to comment.