<p>I can access the kubernetes api to get the deployments using Kubernetes proxy.</p>

<p>I get the list of deployments with:</p>

<pre><code>127.0.0.1:8001/apis/apps/v1/deployments
</code></pre>

<p>This is getting the deployments locally. But what should I use the <code>HOST</code> and <code>PORT</code> to access the deployments from the cluster not locally but using the aws server. 
I am new to Kubernetes, if the question is not understandable please let me know. 
Any help is appreciated.</p>

surazzarus
<p><code>kubectl proxy</code> forwards your traffic localy adding your authentication for you</p>

<p>Your public api endpoint can be exposed in different ways (or it can be completely inaccessible from public network) depending on your cluster setup.</p>

<p>In most cases it would be exposed on something like ie. <a href="https://api.my.cluster.fqdn" rel="nofollow noreferrer">https://api.my.cluster.fqdn</a> or with custom port like <a href="https://api.my.cluster.fqdn:6443" rel="nofollow noreferrer">https://api.my.cluster.fqdn:6443</a> and it would require authentication by ie. getting a baerer token or using client certificate. It is reasonable to use some client library to connect to API.</p>
