<p>I've been learning Kubernetes recently and just came across this small issue. For some sanity checks, here is the functionality of my grpc app running locally:</p>
<pre><code>&gt; docker run -p 8080:8080 -it olamai/simulation:0.0.1
  &lt; omitted logs &gt;
&gt; curl localhost:8080/v1/todo/all
{&quot;api&quot;:&quot;v1&quot;,&quot;toDos&quot;:[{}]}
</code></pre>
<p>So it works! All I want to do now is deploy it in Minikube and expose the port so I can make calls to it. My end goal is to deploy it to a GKE or Azure cluster and make calls to it from there (again, just to learn and get the hang of everything.)<br />
<a href="https://github.com/OlamAI/Simulation/blob/v2/k8s/deployment.yaml" rel="nofollow noreferrer">Here is the yaml I'm using to deploy to minikube</a></p>
<p>And this is what I run to deploy it on minikube</p>
<pre><code>&gt; kubectl create -f deployment.yaml
</code></pre>
<p>I then run this to get the url</p>
<pre><code>&gt; minikube service sim-service --url
http://192.168.99.100:30588
</code></pre>
<p>But this is what happens when I make a call to it</p>
<pre><code>&gt; curl http://192.168.99.100:30588/v1/todo/all
curl: (7) Failed to connect to 192.168.99.100 port 30588: Connection refused
</code></pre>
<p>What am I doing wrong here?</p>
<p>EDIT: I figured it out, and you should be able to see the update in the linked file. I had pull policy set to Never so it was out of date 🤦</p>
<p>I have a new question now... I'm now able to just create the deployment in minikube (no NodePort) and still make calls to the api... shouldn't the deployment need a NodePort service to expose ports?</p>

Diericx
<p>I checked your yaml file and it works just fine. But only I realized that you put 2 types for your services, <code>LoadBalancer</code> and also <code>NodePort</code> which is not needed. 
As if you check from <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types" rel="nofollow noreferrer">this documentation</a> definition of LoadBalancer, you will see </p>

<blockquote>
  <p><a href="https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer" rel="nofollow noreferrer">LoadBalancer</a>: Exposes the service externally using a cloud provider’s
  load balancer. NodePort and ClusterIP services, to which the external
  load balancer will route, are automatically created.</p>
</blockquote>

<p>As an answer for your next question, you probably put <code>type: LoadBalancer</code> to your deployment yaml file, that's why you are able to see NodePort anyway.
If you put <code>type: ClusterIP</code> to your yaml, then service will be exposed only within cluster, and you won't able to reach to your service outside of cluster.</p>

<p>From same <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types" rel="nofollow noreferrer">documentation</a>:</p>

<blockquote>
  <p>ClusterIP: Exposes the service on a cluster-internal IP. Choosing this
  value makes the service only reachable from within the cluster. This
  is the default ServiceType</p>
</blockquote>
