easzlab / kubeasz

使用Ansible脚本安装K8S集群,介绍组件交互原理,方便直接,不受国内网络环境影响
https://github.com/easzlab/kubeasz
10.53k stars 3.53k forks source link

使用容器部署安装执行失败 #1371

Closed darren2013 closed 7 months ago

darren2013 commented 7 months ago

What happened? 发生了什么问题?

fatal: [10.20.183.249]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.setup": {"failed": true, "module_stderr": "/bin/sh: /usr/bin/python3: No such file or directory\n", "module_stdout": "", "msg": "The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error", "rc": 127}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"} fatal: [10.50.3.125]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.setup": {"failed": true, "module_stderr": "/bin/sh: /usr/bin/python3: 没有那个文件或目录\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 127}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"} fatal: [10.20.183.250]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.setup": {"failed": true, "module_stderr": "/bin/sh: /usr/bin/python3: No such file or directory\n", "module_stdout": "", "msg": "The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error", "rc": 127}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"} fatal: [10.50.3.126]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"ansible.legacy.setup": {"failed": true, "module_stderr": "/bin/sh: /usr/bin/python3: 没有那个文件或目录\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 127}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"}

What did you expect to happen? 期望的结果是什么?

能够正常执行

How can we reproduce it (as minimally and precisely as possible)? 尽可能最小化、精确地描述如何复现问题

按照文档部署即可重现 操作系统:centos 7.6

Anything else we need to know? 其他需要说明的情况

No response

Kubernetes version k8s 版本

v1.29.0

Kubeasz version

3.6.3

OS version 操作系统版本

```console # On Linux: $ cat /etc/os-release # paste output here $ uname -a # paste output here ``` NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

Related plugins (CNI, CSI, ...) and versions (if applicable) 其他网络插件等需要说明的情况

spatxos commented 7 months ago

这一步需要自行安装python3

cd /root
wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz
tar -xzf Python-3.11.0.tgz
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
cd Python-3.11.0
./configure --prefix=/usr/python
make
make install
ln -s /usr/python/bin/python3 /usr/bin/python3
ln -s /usr/python/bin/pip3 /usr/bin/pip3
darren2013 commented 7 months ago

cd /root wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz tar -xzf Python-3.11.0.tgz yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make cd Python-3.11.0 ./configure --prefix=/usr/python make make install ln -s /usr/python/bin/python3 /usr/bin/python3 ln -s /usr/python/bin/pip3 /usr/bin/pip3

已解决,感谢

freshgeek commented 5 months ago

能否添加到文档中或者脚本中?

freshgeek commented 5 months ago
image

请问 已经按照上述命令 安装了,脚本还是提示没有文件呢? @spatxos

freshgeek commented 5 months ago

需要在对应的master 、 worker 节点上安装

spatxos commented 5 months ago

是的,master 、 worker 节点都会使用py脚本,所以都需要自行手动安装