<p>How can I expose a web app running inside a Docker container on a Kubernetes cluster created with <code>kubeadm</code>? I want to be able to access the application on an IP address using a regular port (80 or 443). I have tried:</p>

<pre><code>kubectl expose deployments/mywebsite --type=NodePort --port=80
</code></pre>

<p>but I can only access it over a high port number.</p>

<p>Using <code>--type=LoadBalancer</code>, but the external IP stays on <code>Pending</code>.</p>

<p>Is there a way to make my web app accessible over an IP and low port on my custom cluster?</p>

wispi
<p>Are you running Kubernetes cluster on aws or cloud provider? If not you cant used service type load balancer then.</p>

<p>Exposing on nodeport should be Ok and it will allocate a high random port in that 30k-32k range on cluster node.</p>

<p>To use a low port such as 80 , point your external load balancer to Kubernetes nodePort service.</p>

<p>User port 80 on your external load balancer such nginx or apache</p>

<p>You can also use an ingress controller.</p>
