<p>I am attempting to setup Kubernetes locally using a docker instance. I am following <a href="http://kubernetes.io/docs/getting-started-guides/docker/" rel="noreferrer">this documentation</a> but get stuck at the point of creating a new service and exposing the ports.</p>
<p>I have the docker container pulled and I have a <code>kubectl</code> available.</p>
<p>When I run the command <code>kubectl get nodes --show-labels</code> I get the following</p>
<pre>
|NAME       | STATUS  |  AGE   |    LABELS                            |
|-----------|---------|--------|--------------------------------------|
|127.0.0.1  | Ready   |  1h    |    kubernetes.io/hostname=127.0.0.1  |
</pre>
<p>I now create a new service with <code>kubectl run nginx --image=nginx --port=80</code> as per the docs. When I run <code>docker ps</code> I see a container that's been created using my local nginx:latest image.</p>
<pre>
CONTAINER_ID: 4192d1b423ec        
IMAGE: nginx
COMMAND: "nginx -g 'daemon off'"
CREATED: 37 minutes ago
STATUS: Up 37 minutes                           
NAMES: k8s_nginx.aab52821_nginx-198147104-qop91_default_f1cf5d8a-ef2d-11e5-b527-f0def1de109f_940ee216
</pre>
<p>The next step is where I'm having problems <code>kubectl expose rc nginx --port=80</code> is supposed to expose the nginx image as a kubernetes service on port 80.</p>
<p>I get this in the terminal.</p>
<blockquote>
<p><strong>Error</strong> from server: replicationcontrollers &quot;nginx&quot; not found</p>
</blockquote>
<p>So I started reading about replicationcontrollers, I understand the concepts but I do not know how they are configured or setup. This got me to thinking that I'm following what should be an idiot proof setup guide. Can anyone help me with this? I have added my docker and kubernetes versions below.</p>
<h1>Version info</h1>
<h3>Docker version (Local Ubuntu 15.10)</h3>
<pre>
Client:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:59:07 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:59:07 2016
 OS/Arch:      linux/amd64
</pre>
<h3>Kubernetes version</h3>
<pre>
Client Version: version.Info{
    Major:"1", 
    Minor:"2", 
    GitVersion:"v1.2.0",
    GitCommit:"5cb86ee022267586db386f62781338b0483733b3",
    GitTreeState:"clean"
}

Server Version: version.Info{
    Major:"1",
    Minor:"2",
    GitVersion:"v1.2.0",
    GitCommit:"5cb86ee022267586db386f62781338b0483733b3",
    GitTreeState:"clean"
}
</pre>

<p>Kubernetes documentation for docker is outdated for now. Some elements need to be added.</p>

<p>This <a href="https://github.com/kubernetes/kubernetes/issues/4869" rel="nofollow">kubernetes issue</a> is the one to follow.</p>

<p>You can find at <a href="https://github.com/kubernetes/kubernetes/issues/4869#issuecomment-194149162" rel="nofollow">this comment</a> the answer to setup. It's working for me with DNS/Dashboard addons. I have not done a complete test of all the features but complexe application are running on it (understand not helloworld application).</p>

<p>If you are interested, you can find some project that try to solve this setup that is not so trivial if you don't have time:</p>

<ul>
<li><a href="https://github.com/tdeheurles/hive" rel="nofollow">hive</a></li>
<li><a href="https://github.com/skippbox/kmachine" rel="nofollow">kmachine</a></li>
</ul>

<p>Note I don't put any setup here as it will certainly be outdated soon ... Kubernetes documentation is the good place (and for now the issue I pointed you to ^^)</p>
