Skip to content

Commit 1222fbe

Browse files
committed
Fix Kubernetes install script
1 parent 0f5c75f commit 1222fbe

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README-cn.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ git clone https://github.com/rootsongjc/kubernetes-vagrant-centos-cluster.git
6161
cd kubernetes-vagrant-centos-cluster
6262
```
6363

64-
注:如果您是第一次运行该部署程序,那么可以直接执行下面的命令,它将自动帮你下载 Kubernetes 安装包,下一次你就不需要自己下载了,另外您也可以在[这里](https://kubernetes.io/docs/imported/release/notes/)找到Kubernetes的发行版下载地址,下载 Kubernetes发行版后重命名为`kubernetes-server-linux-amd64.tar.gz`,并移动到该项目的根目录下。
64+
**注意**:如果您是第一次运行该部署程序,那么可以直接执行下面的命令,它将自动帮你下载 Kubernetes 安装包,下一次你就不需要自己下载了,另外您也可以在[这里](https://kubernetes.io/docs/imported/release/notes/)找到Kubernetes的发行版下载地址,下载 Kubernetes发行版后重命名为`kubernetes-server-linux-amd64.tar.gz`,并移动到该项目的根目录下。
65+
66+
因为该项目是使用 NFS 的方式挂载到虚拟机的 `/vagrant` 目录中的,所以在安装 NFS 的时候需要您输入密码授权。
6567

6668
使用vagrant启动集群。
6769

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ cd kubernetes-vagrant-centos-cluster
6666

6767
**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.
6868

69+
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.
70+
6971
Set up Kubernetes cluster with vagrant.
7072

7173
```bash

install.sh

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

0 commit comments

Comments
 (0)