<p>I have followed the helloword tutorial on <a href="http://kubernetes.io/docs/hellonode/" rel="noreferrer">http://kubernetes.io/docs/hellonode/</a>.</p>
<p>When I run:</p>
<pre><code>kubectl run hello-node --image=gcr.io/PROJECT_ID/hello-node:v1 --port=8080
</code></pre>
<p>I get:</p>
<blockquote>
<p>The connection to the server localhost:8080 was refused - did you specify the right host or port?</p>
</blockquote>
<p>Why does the command line try to connect to the localhost?</p>

poiuytrez
<p>The issue is that your <code>kubeconfig</code> is not right.
To auto-generate it run:</p>

<pre><code>gcloud container clusters get-credentials "CLUSTER NAME"
</code></pre>

<p>This worked for me.</p>
