kubernetes-sigs/kubespray

kubectl_localhost get wrong binary when ansible host arch is different from deployed cluster

Open

#11,608 opened on Oct 7, 2024

View on GitHub
 (8 comments) (0 reactions) (1 assignee)HTML (4,419 forks)batch import
help wantedkind/bug

Repository metrics

Stars
 (10,380 stars)
PR merge metrics
 (Avg merge 25d) (26 merged PRs in 30d)

Description

What happened?

when enable kubectl_localhost and ansible host arch is x86_64 and deploy a kubernetes cluster on aarch64 systems it copy the binary from the host.

binary from aarch64 host is not got for x86_64 ansible host error: kubectl: cannot execute binary file: Exec format error1

https://github.com/kubernetes-sigs/kubespray/blob/master/roles/kubernetes/client/tasks/main.yml#L90

What did you expect to happen?

when kubectl_localhost enable download correct arch binary to the ansible host

How can we reproduce it (as minimally and precisely as possible)?

1x ansible host x86_64 arch 1x controller node aarch64 arch

deploy kubespray with kubectl_localhost

OS

Ubuntu2204

Version of Ansible

2.17.0

Version of Python

3.11

Version of Kubespray (commit)

master

Network plugin used

calico

Full inventory with variables

Command used to invoke ansible

ansible-playbook -i inventory/arm/hosts.yaml cluster.yml

Output of ansible run

Anything else we need to know

No response

Contributor guide