mirror of https://github.com/easzlab/kubeasz.git
commit
c338241595
|
@ -122,6 +122,21 @@ pip install --no-cache-dir ansible -i http://mirrors.aliyun.com/pypi/simple/ --t
|
|||
ssh-keygen -t rsa -b 2048 回车 回车 回车
|
||||
ssh-copy-id $IPs #$IPs为所有节点地址,按照提示输入yes 和root密码
|
||||
```
|
||||
### 5.在deploy节点编排k8s安装
|
||||
|
||||
``` bash
|
||||
git clone https://github.com/gjmzj/kubeasz.git
|
||||
mv kubeasz /etc/ansible
|
||||
# 下载已打包好的binaries,并且解压缩到/etc/ansible/bin目录
|
||||
# 国内请从我分享的百度云链接下载 https://pan.baidu.com/s/1eSetFSA
|
||||
# 如果你有合适网络环境也可以按照/down/download.sh自行从官网下载各种tar包到 ./down目录,并执行download.sh
|
||||
tar zxvf k8s.184.tar.gz
|
||||
mv bin/* /etc/ansible/bin
|
||||
# 配置ansible的hosts文件
|
||||
cd /etc/ansible
|
||||
cp example/hosts.m-masters.example hosts
|
||||
然后根据上文实际规划修改此hosts文件
|
||||
```
|
||||
+ 验证ansible安装
|
||||
|
||||
``` bash
|
||||
|
@ -146,22 +161,9 @@ ansible all -m ping
|
|||
"ping": "pong"
|
||||
}
|
||||
```
|
||||
### 5.在deploy节点编排k8s安装
|
||||
+ 先不要安装,后文将一步一步讲解后执行安装
|
||||
|
||||
``` bash
|
||||
git clone https://github.com/gjmzj/kubeasz.git
|
||||
mv kubeasz /etc/ansible
|
||||
# 下载已打包好的binaries,并且解压缩到/etc/ansible/bin目录
|
||||
# 国内请从我分享的百度云链接下载 https://pan.baidu.com/s/1eSetFSA
|
||||
# 如果你有合适网络环境也可以按照/down/download.sh自行从官网下载各种tar包到 ./down目录,并执行download.sh
|
||||
tar zxvf k8s.184.tar.gz
|
||||
mv bin/* /etc/ansible/bin
|
||||
# 配置ansible的hosts文件
|
||||
cd /etc/ansible
|
||||
cp example/hosts.m-masters.example hosts
|
||||
然后根据上文实际规划修改此hosts文件
|
||||
# 采用分步安装(确定每一步是否安装成功)或者一步安装
|
||||
# 先不要安装,后文将一步一步讲解后执行安装
|
||||
#ansible-playbook 01.prepare.yml
|
||||
#ansible-playbook 02.etcd.yml
|
||||
#ansible-playbook 03.kubectl.yml
|
||||
|
|
Loading…
Reference in New Issue