我想安装Kubernetes
,Kubespary
但 python 包有问题。我使用Ubuntu 20.10
和python3
ansible --version
ansible 2.9.6
config file = /opt/kubespray/ansible.cfg
configured module search path = ['/opt/kubespray/library']
ansible python module location = /opt/ansible/lib/python3.8/site-packages/ansible
executable location = /opt/ansible/bin/ansible
python version = 3.8.6 (default, Sep 25 2020, 09:36:53) [GCC 10.2.0]
pip3 freeze
ansible==2.9.6
cffi==1.14.4
cryptography==3.3.1
Jinja2==2.11.1
jmespath==0.9.5
MarkupSafe==1.1.1
netaddr==0.7.19
pbr==5.4.4
pkg-resources==0.0.0
pycparser==2.20
PyYAML==5.3.1
ruamel.yaml==0.16.10
ruamel.yaml.clib==0.2.2
six==1.15.0
当我使用此命令运行 ansible 角色时:
ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root cluster.yml
我有这个错误。
TASK [kubernetes/preinstall : Update common_required_pkgs with ipvsadm when kube_proxy_mode is ipvs] *********************************************************************************************************
ok: [node1]
ok: [node2]
ok: [node3]
ok: [node4]
ok: [node5]
Monday 11 January 2021 09:34:05 +0000 (0:00:00.137) 0:00:34.827 ********
FAILED - RETRYING: Install packages requirements (4 retries left).
FAILED - RETRYING: Install packages requirements (4 retries left).
FAILED - RETRYING: Install packages requirements (4 retries left).
FAILED - RETRYING: Install packages requirements (4 retries left).
FAILED - RETRYING: Install packages requirements (4 retries left).
FAILED - RETRYING: Install packages requirements (3 retries left).
FAILED - RETRYING: Install packages requirements (3 retries left).
FAILED - RETRYING: Install packages requirements (3 retries left).
FAILED - RETRYING: Install packages requirements (3 retries left).
FAILED - RETRYING: Install packages requirements (3 retries left).
FAILED - RETRYING: Install packages requirements (2 retries left).
FAILED - RETRYING: Install packages requirements (2 retries left).
FAILED - RETRYING: Install packages requirements (2 retries left).
FAILED - RETRYING: Install packages requirements (1 retries left).
FAILED - RETRYING: Install packages requirements (2 retries left).
FAILED - RETRYING: Install packages requirements (2 retries left).
FAILED - RETRYING: Install packages requirements (1 retries left).
FAILED - RETRYING: Install packages requirements (1 retries left).
TASK [kubernetes/preinstall : Install packages requirements] ****************************************************************************************************
fatal: [node1]: FAILED! => {"attempts": 4, "changed": false, "msg": "No package matching 'python-apt' is available"}
fatal: [node2]: FAILED! => {"attempts": 4, "changed": false, "msg": "No package matching 'python-apt' is available"}
fatal: [node5]: FAILED! => {"attempts": 4, "changed": false, "msg": "No package matching 'python-apt' is available"}
FAILED - RETRYING: Install packages requirements (1 retries left).
FAILED - RETRYING: Install packages requirements (1 retries left).
fatal: [node4]: FAILED! => {"attempts": 4, "changed": false, "msg": "No package matching 'python-apt' is available"}
fatal: [node3]: FAILED! => {"attempts": 4, "changed": false, "msg": "No package matching 'python-apt' is available"}
NO MORE HOSTS LEFT *********************************************************************************************************
PLAY RECAP ************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
node1 : ok=69 changed=1 unreachable=0 failed=1 skipped=90 rescued=0 ignored=0
node2 : ok=54 changed=1 unreachable=0 failed=1 skipped=75 rescued=0 ignored=0
node3 : ok=52 changed=1 unreachable=0 failed=1 skipped=77 rescued=0 ignored=0
node4 : ok=51 changed=1 unreachable=0 failed=1 skipped=78 rescued=0 ignored=0
node5 : ok=51 changed=1 unreachable=0 failed=1 skipped=78 rescued=0 ignored=0
我该如何解决这个问题?
"msg": "No package matching 'python-apt' is available"}
谢谢。