Error when installing a Kubernetes cluster (Kubespray)

  Kiến thức lập trình

I apply the command ansible-playbook -vvvv -i inventory/cluster/inventory.ini cluster.yml, then at one of the steps I get the following error.

Help me figure out what the problem is.
I’m using the latest version of kubespray from guthub.
I’m also using rockylinux.

TASK [download : Download_container | Download image if required] *************************************************** task path: /home/rockylinux/kubespray/roles/download/tasks/download_container.yml:57 The full traceback is: WARNING: The below traceback may *not* be related to the actual failure. File "/tmp/ansible_ansible.legacy.command_payload_QDh531/ansible_ansible.legacy.command_payload.zip/ansible/module_utils/basic.py", line 2020, in run_command cmd = subprocess.Popen(args, **kwargs) File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child raise child_exception fatal: [controlplane1.example.tst]: FAILED! => { "attempts": 4, "changed": false, "cmd": "/usr/local/bin/ctr -n k8s.io images pull --hosts-dir /etc/containerd/certs.d registry.k8s.io/cpa/cluster-proportional-autoscaler:v1.8.8", "invocation": { "module_args": { "_raw_params": "/usr/local/bin/ctr -n k8s.io images pull --hosts-dir /etc/containerd/certs.d registry.k8s.io/cpa/cluster-proportional-autoscaler:v1.8.8", "_uses_shell": false, "argv": null, "chdir": null, "creates": null, "executable": null, "expand_argument_vars": true, "removes": null, "stdin": null, "stdin_add_newline": true, "strip_empty_ends": true } }, "msg": "[Errno 2] No such file or directory", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []

I’m not very good at solving problems in linux and at first I thought the problem was lack of CTR, but below I give a piece of log where a command using CTR is successfully executed.

`TASK [download : Set image save/load command for containerd on localhost] *******************************************
task path: /home/rockylinux/kubespray/roles/download/tasks/set_container_facts.yml:47
ok: [controlplane1.example.tst] => {
“ansible_facts”: {
“image_save_command_on_localhost”: “/usr/local/bin/ctr -n k8s.io image export –platform linux/amd64 /tmp/kubespray_cache/images/registry.k8s.io_cpa_cluster-proportional-autoscaler_v1.8.8.tar registry.k8s.io/cpa/cluster-proportional-autoscaler:v1.8.8”
},
“changed”: false
}
Thursday 11 July 2024 09:34:07 -0400 (0:00:00.209) 0:11:28.293 *********
Thursday 11 July 2024 09:34:07 -0400 (0:00:00.125) 0:11:28.419 *********

TASK [download : Download_container | Prepare container download] ***************************************************`

I tried creating the /etc/containerd/certs.d directory manually and tried searching for this problem on the internet, but no one seemed to have such errors.

New contributor

Alexey Arhipov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT