<p>I'm newbie of the Kubernetes while I'm using Google Cloud Container. I just follow the tutorials as belows:</p>

<p><a href="https://cloud.google.com/container-engine/docs/tutorials/http-balancer" rel="nofollow">https://cloud.google.com/container-engine/docs/tutorials/http-balancer</a>
<a href="http://kubernetes.io/docs/hellonode/#create-your-pod" rel="nofollow">http://kubernetes.io/docs/hellonode/#create-your-pod</a></p>

<p>In these tutorials, I'll get the replicacontroller after I run the "kubectl run" but there is no replicacontrollers so that I cannot run the command of "kubectl expose rc" in order to open a port.</p>

<p>Here is my result of the commands:</p>

<pre><code>ChangMatthews-MacBook-Pro:frontend changmatthew$ kubectl run nginx --image=nginx --port=80
deployment "nginx" created

ChangMatthews-MacBook-Pro:frontend changmatthew$ kubectl expose rc nginx --target-port=80 --type=NodePort
Error from server: replicationcontrollers "nginx" not found
</code></pre>

<p>Here is my result when I run "kubectl get rc,svc,ingress,deployments,pods":</p>

<pre><code>ChangMatthews-MacBook-Pro:frontend changmatthew$ kubectl get rc,svc,ingress,deployments,pods
NAME                    CLUSTER-IP   EXTERNAL-IP   PORT(S)           AGE
kubernetes              10.3.240.1   &lt;none&gt;        443/TCP           12m
NAME                    RULE         BACKEND       ADDRESS           AGE
basic-ingress           -            nginx:80      107.178.247.247   12m
NAME                    DESIRED      CURRENT       UP-TO-DATE        AVAILABLE   AGE
nginx                   1            1             1                 1           11m
NAME                    READY        STATUS        RESTARTS          AGE
nginx-198147104-zgo7m   1/1          Running       0                 11m
</code></pre>

<p>One of my solution is to create yaml file which define the replicacontroller. But is there any way to create replicacontroller via kubectl run command like above tutorials?</p>

<p>Thanks,</p>

<p>Now that kubectl run creates a deployment, you specify that the type being exposed in a deployment rather than a replication controller:</p>

<pre><code>kubectl expose deployment nginx --target-port=80 --type=NodePort
</code></pre>
