[Ansible Galaxy] Use Ansible community.kubernetes.helm to manages Kubernetes (K8S) packages with the Helm package manager
community.kubernetes.helm
community.kubernetes.helm is an Ansible Galaxy to install, upgrade, delete packages with the Helm to manages Kubernetes packages with the Helm package manager
Ansible is Simple IT Automation - https://www.ansible.com/ can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.
Ansible’s main goals are simplicity and ease-of-use. It also has a strong focus on security and reliability, featuring a minimum of moving parts, usage of OpenSSH for transport (with other transports and pull modes as alternatives), and a language that is designed around auditability by humans–even those not familiar with the program.
Ansible is a universal language, unraveling the mystery of how work gets done. Turn tough tasks into repeatable playbooks.
This article is about how to use community.kubernetes.helm to manage releases with the Helm package manager.
Prerequisites
-
Kubernetes (K8S)
Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications. -
Helm
Helm is the best way to find, share, and use software built for Kubernetes.
Installation
Install Ansible
1 | Mac OS X |
Install community.kubernetes
This plugin is part of the community.kubernetes collection.
To install it use:
1 | ansible-galaxy collection install community.kubernetes |
Examples
To use it in a playbook, specify: community.kubernetes.helm
. For example use ommunity.kubernetes.helm
to install nfs-server-provisioner helm chart.
See the directory structure.
1 | tree . |
Edit the playbook file.
1 | # playbooks/helm.yml |
1 | ansible-playbook -i hosts playbooks/helm.yml |
See Helm release about cert-manager.
1 | helm list --namespace cert-manager |
See pods about cert-manager.
1 | kubectl get pods -n cert-manager |
More examples
Visist community.kubernetes.helm - Manages Kubernetes packages with the Helm package manager — Ansible Documentation: https://docs.ansible.com/ansible/latest/collections/community/kubernetes/helm_module.html to see more examples.
References
[2] Ansible is Simple IT Automation - https://www.ansible.com/