I am trying to upgrade helm with helm upgrade
in kubernetes cluster using Ansible.
I have 10 different namespaces. I have written Ansible playbook get all 10 namespaces, after that we have to upgrade helm using helm upgrade command in 10 names automatically, here I am not able to that activity. May I know how can we do that?
Your question is not completely clear to me. Anyway, as far as I understand you were able to collect the all your namespaces (I assume that you have stored this in ansible variable called namespaces_list
). And you are now stuck, to loop on that list to run the different helm updates…
- name: Update helm chart
helm:
host: localhost
chart:
name: …
…
state: present
name: …
namespace: "{{ namespace }}"
loop: "{{ namespaces_list }}"
loop_control:
loop_var: namespace