# k8s Module: Unable to escape SSL\_Cert error calling nodes.

**URL:** <https://forum.ansible.com/t/k8s-module-unable-to-escape-ssl-cert-error-calling-nodes/31491>\
**Category:** Ansible Project\
**Tags:** kubernetes\
**Created:** [October 18, 2019, 9:34pm UTC](https://forum.ansible.com/t/k8s-module-unable-to-escape-ssl-cert-error-calling-nodes/31491 "2019-10-18T21:34:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boa\_Ah](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@Boa\_Ah](https://forum.ansible.com/u/Boa_Ah)\
**Post date:** [October 18, 2019, 9:34pm UTC](https://forum.ansible.com/t/k8s-module-unable-to-escape-ssl-cert-error-calling-nodes/31491/1 "2019-10-18T21:34:12Z")

</div>

Team, My playbook is below and unable to get rid of the cert.

```auto

- name: Fetch all deployments
set_fact:
deployments: "{{ lookup('k8s', kind='Deployment') }}"
kubeconfig: $WORKSPACE

- name: Fetch all Nodes with Module
k8s:
service: "{{ lookup('k8s', kind='Node') }}"
#validate_certs: no
verify_ssl: no
kubeconfig: $WORKSPACE

```

any hint?

TASK [3\_validations\_on\_ssh : Fetch all deployments] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2019-10-18 14:31:42,409 WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLError(1, u’[SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed (\_ssl.c:590)‘),)’: /apis/apps/v1/deployments  
2019-10-18 14:31:42,430 WARNING Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLError(1, u’[SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed (\_ssl.c:590)‘),)’: /apis/apps/v1/deployments  
2019-10-18 14:31:42,447 WARNING Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLError(1, u’[SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed (\_ssl.c:590)‘),)’: /apis/apps/v1/deployments  
fatal: [target1]: FAILED! =\> {“msg”: “An unhandled exception occurred while running the lookup plugin ‘k8s’. Error was a \<class ‘urllib3.exceptions.MaxRetryError’\>, original message: HTTPSConnectionPool(host=‘[maglev-dev0-sjc4.nonprod-nvkong.com](http://maglev-dev0-sjc4.nonprod-nvkong.com)’, port=443): Max retries exceeded with url: /apis/apps/v1/deployments (Caused by SSLError(SSLError(1, u’[SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed (\_ssl.c:590)'),))”}

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [October 19, 2019, 5:23am UTC](https://forum.ansible.com/t/k8s-module-unable-to-escape-ssl-cert-error-calling-nodes/31491/2 "2019-10-19T05:23:35Z")

</div>

I assume you want to get rid of the cert errors and not of the cert itself. According to

[https://docs.ansible.com/ansible/latest/plugins/lookup/k8s.html](https://docs.ansible.com/ansible/latest/plugins/lookup/k8s.html) you should use the ‘validate\_certs’ option.
