<p>I have created pods using below yaml.</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: kubia-liveness
spec:
  containers:
   - image: luksa/kubia-unhealthy
    name: kubia
     livenessProbe:
      httpGet:
       path: /
       port: 8080
</code></pre>

<p>Then I created pods using the below command.</p>

<pre><code>$ kubectl create -f kubia-liveness-probe.yaml
</code></pre>

<p>It created a pod successfully.</p>

<p>Then I'm trying to create load balancer service to access from the external world.
For that I'm using the below command.</p>

<pre><code>$ kubectl expose rc kubia-liveness --type=LoadBalancer --name kubia-liveness-http
</code></pre>

<p>For this, I'm getting below error.</p>

<pre><code>Error from server (NotFound): replicationcontrollers "kubia-liveness" not found
</code></pre>

<p>I'm not sure how to create replicationControllers. Could anybody please give me the command to do the same.</p>

<p>You are mixing two approaches here, one is creating stuff from yaml definition, which is good by it self (but bare in mind that it is really rare to create a POD rather then Deployment or ReplicationController) with exposing via CLI, which has some assumptions made (ie. it expects replication controller) and with these assumptions it creates appropriate service. My suggestion would be to go for creating Service from yaml manifest as well, so you can tailor it to fit your case.</p>
