<p>Want to get the list of pods ussing ansible.
HEre is the approach I did</p>
<pre class="lang-yaml prettyprint-override"><code># tasks file for elasticsearch_secure
- name: Fetch podd deatils
  k8s_info:
   kind: Pod
   field_selectors:
    - status.phase=Running
   namespace: &lt;ns&gt;
  register: pod_list
  become: yes
  delegate_to: localhost
</code></pre>
<p>I am getting connection time out</p>
<pre><code>FAILED! =&gt; {&quot;changed&quot;: false, &quot;msg&quot;:
  &quot;Failed to get client due to HTTPSConnectionPool(host='&lt;clusterip&gt;', port=6443):
   Max retries exceeded with url: /version
   (Caused by NewConnectionError('&lt;urllib3.connection.HTTPSConnection object at 0x1081d5d00&gt;:
    Failed to establish a new connection: [Errno 60] Operation timed out'))&quot;}
</code></pre>
<p>IS there anyother way I can get podd details</p>
<pre><code>$ python --version
Python 2.7.16
$ pip3 list | grep openshift
openshift           0.11.2
</code></pre>
<p>Please pour your suggestion stucked here.</p>

<p>I had the same issue and it seems to be a problem with Python's <code>kubernetes</code> module: <a href="https://github.com/kubernetes-client/python/issues/1333" rel="nofollow noreferrer">https://github.com/kubernetes-client/python/issues/1333</a></p>
<p>What worked for me was to uninstall the <code>kubernetes</code> and <code>openshift</code> modules and install them again with the compatible versions for <code>openshift==0.11.2</code>:</p>
<pre class="lang-sh prettyprint-override"><code># Uninstall kubernetes and openshift
$ pip3 uninstall -y openshift kubernetes

# This command also installs kubernetes
$ pip3 install -Iv openshift==0.11.2

# Installed versions
$ pip3 list | grep -e openshift -e kubernetes
kubernetes                 11.0.0
openshift                  0.11.2
</code></pre>
