ansible-collections / community.kubernetes

Kubernetes Collection for Ansible
https://galaxy.ansible.com/community/kubernetes
GNU General Public License v3.0
265 stars 106 forks source link

Support of binary_path for kubectl go binary #398

Closed RafalSkolasinski closed 3 years ago

RafalSkolasinski commented 3 years ago
SUMMARY

Helm modules allow to specify binary_path - see docs.

It would be nice if one could also specify kubectl binary when using the main community.kubernetes.k8s module.

ISSUE TYPE
COMPONENT NAME

community.kubernetes.k8s

ADDITIONAL INFORMATION

I want to make use of the community.kubernetes.k8s in the self-contained environment adding another role that will first fetch a desired version of kubectl, helm, etc. and then use these versions when calling the community.kubernetes.k8s modules.

gravesm commented 3 years ago

Hi @RafalSkolasinski, the helm modules and the k8s module function a bit differently. For the helm modules we call out to the helm binary, but the k8s module uses the python kubernetes client, not kubectl to interact with kubernetes.

RafalSkolasinski commented 3 years ago

Hi @gravesm, okay, great, so basically there is no dependency on the kubectl binary being present on the host system? That is even better news :)

gravesm commented 3 years ago

That's correct. The one caveat is that if you are using the k8s inventory plugin or the kubectl connection plugin they will require that kubectl is present.