<p>I am using minikube to learn about docker, but I have come across a problem.</p>
<p>I am following along with the examples in Kubernetes in Action, and I am trying to get a pod that I have pulled from my docker hub account, but I cannot make this pod visible.</p>
<p>if I run</p>
<pre><code>kubectl get pod
</code></pre>
<p>I can see that the pod is present.</p>
<pre><code>NAME    READY   STATUS    RESTARTS   AGE
kubia   1/1     Running   1          6d22h
</code></pre>
<p>However when I do the first step to create a service</p>
<pre><code>kubectl expose rc kubia --type=LoadBalancer --name kubia-http service &quot;kubia-http&quot; exposed
</code></pre>
<p>I am getting this error returned</p>
<pre><code>Error from server (NotFound): replicationcontrollers &quot;kubia&quot; not found
Error from server (NotFound): replicationcontrollers &quot;service&quot; not found
Error from server (NotFound): replicationcontrollers &quot;kubia-http&quot; not found
Error from server (NotFound): replicationcontrollers &quot;exposed&quot; not found
</code></pre>
<p>Any ideas why I am getting this error and what I need to do to correct it?</p>
<p>I am using minikube v1.13.1 on mac Mojave (v10.14.6), and I can't upgrade because I am using a company supplied machine, and all updates are controlled by HQ.</p>

<p>In this book, used command is <code>kubectl run kubia --image=luksa/kubia --port=8080 --generator=run/v1</code> which used to create <code>ReplicationController</code> back in the days when book was written however this object is currently depracated.</p>
<p>Now <code>kubectl run</code> command creates standalone pod without ReplicationController. So to expose it you should run:</p>
<pre><code>kubectl expose pod kubia --type=LoadBalancer --name kubia-http
</code></pre>
<p>In order to create a replication it is recommended to use <code>Deployment</code>. To create it using CLI you can simply run</p>
<pre><code>kubectl create deployment &lt;name_of_deployment&gt; --image=&lt;image_to_be_used&gt;
</code></pre>
<p>It will create a deployment and one pod. And then it can be exposed similarly to previous pod exposure:</p>
<pre><code>kubectl expose deployment kubia --type=LoadBalancer --name kubia-http
</code></pre>
