<p>I'm attempting to expose a server on port 80 via kubernetes.</p>
<p>Start minikube :</p>
<pre><code>minikube start
</code></pre>
<p>Create a deployment by running the command</p>
<pre><code>&quot;kubectl create deployment apache --image=httpd:2.4&quot;
</code></pre>
<p>Create a service by running the command</p>
<pre><code>&quot;kubectl create service nodeport apache --tcp=80:80&quot;


kubectl get svc
</code></pre>
<p>returns :</p>
<pre><code>NAME         TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
apache       NodePort    10.105.48.77   &lt;none&gt;        80:31619/TCP   5s
kubernetes   ClusterIP   10.96.0.1      &lt;none&gt;        443/TCP        43s
</code></pre>
<p>I've attempted to open 10.105.48.77 &amp; 10.96.0.1 on port 80 but the service is not running.</p>
<p>How to start a simple http server on port 80 via kubernetes that will serve requests to that same port ?</p>

blue-sky
<p><code>NodePort</code> has a range <code>30000-32767</code>. Your log shows <code>31619</code> is assigned, you may try that. If you really want port 80 you will need other types of service, for example <code>LoadBalancer</code>. You can also use <code>port-forward</code> to forward you local port <code>80</code> to the <code>apache</code> pod.</p>
