<p>I am following the hellonode tutorial on kubernetes.io</p>

<p><a href="http://kubernetes.io/docs/hellonode/" rel="nofollow">http://kubernetes.io/docs/hellonode/</a></p>

<p>I am getting an error when trying to do the 'Create your pod' section.</p>

<p>When I run this command (replacing PROJECT_ID with the one I created) I get the following:</p>

<pre><code>$ kubectl run hello-node --image=gcr.io/PROJECT_ID/hello-node:v1 --port=8080

The connection to the server localhost:8080 was refused - did you specify the right host or port?
</code></pre>

<p>I get a similar error just typing kubectl version:</p>

<pre><code>$ kubectl version

Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.2", GitCommit:"528f879e7d3790ea4287687ef0ab3f2a01cc2718", GitTreeState:"clean"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?
</code></pre>

<p>I'm not sure what to do since I have no experience with kubernetes other than following the steps of this tutorial.</p>

<p>I figured out the issue.
In the <code>Create your cluster</code> section I missed a critical step. </p>

<p>The step I missed was:  <code>Please ensure that you have configured kubectl to use the cluster you just created.</code> The configured part is a link to how to do this:</p>

<p>The steps are as follows:</p>

<pre><code>gcloud config set project PROJECT
gcloud config set compute/zone ZONE
gcloud config set container/cluster CLUSTER_NAME
gcloud container clusters get-credentials CUSTER_NAME
</code></pre>
