<p>I am trying to refresh my K8s knowledge and am following <a href="https://github.com/knrt10/kubernetes-basicLearning" rel="nofollow noreferrer">this tutorial</a>, but am running in some problems. My current cluster (<code>minikube</code>) contains one pod called <code>kubia</code>. This pod is alive and well and contains a simple Webserver.</p>
<p>I want to expose that server via a <code>kubectl expose pod kubia --type=LoadBalancer --name kubia-http</code>.</p>
<p><strong>Problem:</strong> According to my K8s dashboard, <code>kubia-http</code> gets stuck on startup.</p>
<p><strong>Debugging:</strong></p>
<p><code>kubectl describe endpoints kubia-http</code> gives me</p>
<pre><code>Name:         kubia-http
Namespace:    default
Labels:       run=kubia
Annotations:  endpoints.kubernetes.io/last-change-trigger-time: 2020-11-20T15:41:29Z
Subsets:
  Addresses:          172.17.0.5
  NotReadyAddresses:  &lt;none&gt;
  Ports:
    Name     Port  Protocol
    ----     ----  --------
    &lt;unset&gt;  8080  TCP

Events:  &lt;none&gt;
</code></pre>
<p>When debugging I tried to answer the following questions:</p>
<p>1.) Is my service missing an endpoint?</p>
<p><code>kubectl get pods --selector=run=kubia</code> gives me one <code>kubia</code> pod. So, I am not missing an endpoint.</p>
<p>2.) Does my service try to access the wrong port when communicating with the pod?</p>
<p>From my pod yaml:</p>
<pre><code>  containers:
    - name: kubia
      ports:
        - containerPort: 8080
          protocol: TCP
</code></pre>
<p>From my service yaml:</p>
<pre><code>  ports:
    - protocol: TCP
      port: 8080
      targetPort: 8080
      nodePort: 32689
</code></pre>
<p>The service tries to access the correct port.</p>
<p><strong>What is a good approach to debug this problem?</strong></p>

User12547645
<p>How does the below command output looks like?</p>
<ol>
<li><code>kubectl get services kubia-http</code></li>
<li><code>kubectl describe services kubia-http</code></li>
</ol>
<p>Does everything looks normal there?</p>
<p>I think you are facing similar issue mentioned in this <a href="https://stackoverflow.com/questions/44110876/kubernetes-service-external-ip-pending">question</a>.
So if <code>kubectl get services kubia-http</code> looks good except the known expected behavior <code>external ip pending on minikube</code>, you should able to access the service using nodeport or clusterip</p>
