Hi

There is already a collection to deal with Kubernetes.

1. community.kubernetes (kubernetes.core) -
https://github.com/ansible-collections/community.kubernetes
2. community.okd (for OKD and OpenShift) -
https://github.com/ansible-collections/community.okd

You can check out the code implemented in the module_utils.

Let me know if you have any questions.

On Thu, Nov 19, 2020 at 9:02 PM Андрей Метелкин <[email protected]>
wrote:

> I want to connect to API Kubernetes with Ansible. Ansible and Kubernetes
> are installed on different hosts. Unfortunately, I cannot find a normal
> description of how this works.
> Please help with links to manuals where the process is described in detail.
>
> 1) I want to understand if it is possible to create a key and a token by
> which I will easily connect to the API. I want to understand whether it is
> possible to create a key and a token without being bound to any namespace
> or service account.
> 2) I want to understand how to create a key and a token in Kubernetes that
> ansible can use.
> 3) I want to understand where to store the key and token on the ansible
> side. I want to understand where in the playbook to specify the key and
> token.
>
> Thanks in advance!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/282e2245-35b8-4f3d-8c6b-84c9181afc6an%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/282e2245-35b8-4f3d-8c6b-84c9181afc6an%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Thanks,
Abhijeet Kasurde

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFwWkHrKabKHbe3ax_1JUEKrG82qiXzwaT2%3DOd-%2B6KrtvL3mhg%40mail.gmail.com.

Reply via email to