sguyennet / terraform-vsphere-kubespray

Deploy a Kubernetes HA cluster on VMware vSphere
https://blog.inkubate.io/install-and-manage-automatically-a-kubernetes-cluster-on-vmware-vsphere-with-terraform-and-kubespray/
Apache License 2.0
172 stars 88 forks source link

Deployment Error: TASK [download : prep_kubeadm_images | Copy kubeadm binary from download dir to system path #27

Open amithanoop opened 4 years ago

amithanoop commented 4 years ago

Error: TASK [download : prep_kubeadm_images | Copy kubeadm binary from download dir to system path] * Thursday 02 January 2020 22:01:04 +0530 (0:00:00.778) 0:09:40.886 **** fatal: [k8s-kubespray-master-0 -> 10.12.43.220]: FAILED! => {"changed": false, "cmd": "sshpass", "msg": "[Errno 2] No such file or directory: b'sshpass': b'sshpass'", "rc": 2}

Details: Template Using : Ubuntu 18.04 For SSH login using user name and password

gelmistefano commented 4 years ago

Hi, i've seen this issue in my tests. I've resolved changing "synchronize" with "copy":

  copy:
    src: "{{ local_release_dir }}/kubeadm-{{ kubeadm_version }}-{{ image_arch }}"
    dest: "{{ bin_dir }}/kubeadm"
    remote_src: yes
    mode: preserve

this issue is present in all "Copy ... binary from download dir"

fastlorenzo commented 4 years ago

I fixed it by adding interpreter_python=python3 in the [defaults] section of the ansible/kubespray/ansible.cfg file. It seems to be an issue with python 2, which was used by default.

Reference

bordenit commented 3 years ago

The fix for me was to install sshpass on the the node the playbook was running against, which also required epel-release:

yum install epel-release
yum install sshpass
ManuelCastilla commented 3 years ago

I have the same problem. I followed the recommendation of fastlorenzo but I maintain the problem. Could gelmistefano give me details of path for that code? Which is the name file?