Hello,
some days ago I start to run my first kubernetes cluster with heketi (and glusterfs) on some VMs. Now the cluster is running and I would like to deploy some pods and a new volume to this cluster, but I didn’t find any useful example how I can use ansible to deploy (a pod, service, deployment, pvc) to the cluster and specially if there is a way to access a volume I create by ansible.
Maybe I am just blind or too stupid to use google right, but can someone give me some example how I can automate the usage of kubernetes with ansible?
best regards
Dan
Hi Dan, lets dispel something real quick, you aren’t stupid, I hope it
was just self deprecating humor But I just wanted to reaffirm that
you are clearly working with complex systems and seem to doing well
with them.
Unfortunately I can’t provide an example I think it depends on what you
are trying to do, but Ansible does have a kubernetes and helm modules
additionally kubernetes inventory modules. Try to manage the resources
using the inline_data parameter, you can make most of those as
variables and you should be all set. Unless I’m not understanding what
you are seeking to do. As for Heketi, you could utilize the uri module
since Heketi has a REST API.
You might also want to take a look at Ansible Playbook Bundles, I
recently saw a presentation at SouthEast LinuxFest and it looks
promising, but might require some more reading.
I hope this helps,
-Kevin