<p>Trying to use kubernetes-client and it works fine if I want to get a list of PODs. But how do I get a list of services, i.e.:</p>

<pre><code>kubectl get services
</code></pre>

<p>I could not find any appropriate method in kubernetes-client:</p>

<pre><code>const Client = require('kubernetes-client').Client;
const Config = require('kubernetes-client/backends/request').config;

const client = new K8sClient({ config: Config.fromKubeconfig(), version: '1.13' });

const pods = await client.api.v1.namespaces('xxxxx').pods.get({ qs: { labelSelector: 'application=test' } });
console.log('Pods: ', JSON.stringify(pods));
</code></pre>

John Glabb
<p>From the <a href="https://github.com/godaddy/kubernetes-client/blob/master/docs/1.13/Service.md" rel="nofollow noreferrer">godaddy/kubernetes-client</a> Libraries.</p>

<p>There seems to be:</p>

<p><a href="https://github.com/godaddy/kubernetes-client/blob/master/docs/1.13/Service.md#apiv1namespacesnamespaceservicesget" rel="nofollow noreferrer"><code>api.v1.namespaces(namespace).services.get</code></a></p>

<blockquote>
  <p>list or watch objects of kind Service</p>
</blockquote>

<p>Which looks the same as:</p>

<p><a href="https://github.com/godaddy/kubernetes-client/blob/master/docs/1.13/Pod.md#apiv1namespacesnamespacepodsget" rel="nofollow noreferrer"><code>api.v1.namespaces(namespace).pods.get</code></a></p>

<blockquote>
  <p>list or watch objects of kind Pod</p>
</blockquote>
