i'm trying to automate deployment in eks cluster using k8s ansible module. It's seem that k8s module doesn't support EKS.
does anyone have an example of managing objects in eks using k8s ansible module.
Thanks in advance.
Thanks everyone, for your comments, it finally works.
I just reconfigure the file ~/.kube/kubeconfig and set the good config in ~/.aws/.
Snippet of the Ansible task:
- name: "deploy app"
k8s:
kubeconfig: "{{ kube_config }}"
namespace: "default"
state: "present"
src: "{{ item }}"
with_items:
- "{{ data_dir }}/{{ instance_name }}/deployment/deployment_file_1.yml"
- "{{ data_dir }}/{{ instance_name }}/deployment/deployment_file_2.yml"
- "{{ data_dir }}/{{ instance_name }}/deployment/deployment_file_3.yml"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With