<p>I'm looking to create a small web application that lists some data about the ingresses in my cluster. The application will be hosted in the cluster itself, so I assume i'm going to need a service account attached to a backend application that calls the kubernetes api to  get the data, then serves that up to the front end through a GET via axios etc. Am I along the right lines here?</p>

Sheen
<p>You can use the JavaScript Kubernetes Client package for node directly in you node application to access kubeapi server over REST APIs</p>
<pre><code>npm install @kubernetes/client-node
</code></pre>
<p>You can use either way to provide authentication information to your kubernetes client</p>
<p>This is a code which worked for me</p>
<pre><code>const k8s = require('@kubernetes/client-node');

const cluster = {
  name: '&lt;cluster-name&gt;',
  server: '&lt;server-address&gt;',
  caData: '&lt;certificate-data&gt;'
};

const user = {
  name: '&lt;cluster-user-name&gt;',
  certData: '&lt;certificate-data&gt;',
  keyData: '&lt;certificate-key&gt;'
};

const context = {
  name: '&lt;context-name&gt;',
  user: user.name,
  cluster: cluster.name,
};

const kc = new k8s.KubeConfig();
kc.loadFromOptions({
  clusters: [cluster],
  users: [user],
  contexts: [context],
  currentContext: context.name,
});

const k8sApi = kc.makeApiClient(k8s.NetworkingV1Api);
k8sApi.listNamespacedIngress('&lt;namespace&gt;').then((res) =&gt; {
  console.log(res.body);
});
</code></pre>
<p>You need to Api client according to your ingress in my case I was using networkingV1Api</p>
<p>You can get further options from
<a href="https://github.com/kubernetes-client/javascript" rel="nofollow noreferrer">https://github.com/kubernetes-client/javascript</a></p>
