kubernetes.core icon indicating copy to clipboard operation
kubernetes.core copied to clipboard

How can I use kubernetes.core.kubectl connection to connect to the Supervisor of a VMware TKG cluster?

Open mbx64 opened this issue 1 year ago • 3 comments

SUMMARY

When connecting to the Supervisor of a VMware TKG cluster, you have to use the following command manually:

kubectl vsphere login --server=<KUBERNETES-CONTROL-PLANE-IP-ADDRESS> --vsphere-username <VCENTER-SSO-USER>

After that, I have a kubeconfig file with which I can connect to my cluster with the modules of this collection. But is there a way I can pass arguments to the kubernetes.core.kubectl connection module, so that I can directly connect to my cluster, without executing kubectl vsphere login beforehand?

ISSUE TYPE
  • Documentation Report
COMPONENT NAME

kubectl

ANSIBLE VERSION
nsible [core 2.15.8]
  config file = /home/user/.ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/.local/lib/python3.9/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/user/.local/bin/ansible
  python version = 3.9.17 (main, Aug 10 2023, 15:11:31) [GCC 8.5.0 20210514 (Red Hat 8.5.0-20)] (/usr/bin/python3)
  jinja version = 3.1.3
  libyaml = True

mbx64 avatar Jan 25 '24 10:01 mbx64