<p>Scenario:
I'm trying to learn some K8s by re-creating my current stack with containers and container orchestration.</p>

<p>Background:
My current dev stack consists of Wordpress, NextCloud, BTCPayServer, Jitsi and Mail-in-a-box. Everything is OpenSource and running just fine each one in its own separate KVM VPS.</p>

<p>Objectives:
My goal is to be able to deploy the same solutions on K8s in order to be able to scale and gain a bit more flexibility while developing.</p>

<p>Limitations:
My budget is limited so I work with KVM VPS in small hosting providers (no AWS/GCE/Azure/DO/etc).</p>

<p>Current K8S setup is 1 Domain with 1 Master + 2 Workers:
 - Master 1: 2xCPU, 2gb RAM, 50gb SSD, Master01_IP
 - Worker 1: 1xCPU, 1gb RAM, 10gb SSD, Worker01_IP
 - Worker 2: 2xCPU, 3gb RAM, 60gb SSD, Worker02_IP</p>

<p>Somehow I managed to get the cluster working, I edited /etc/hosts with all 3 IPs in each server, run the master and then joined the two workers.</p>

<p>Then installed Wordpress by executing:</p>

<p>helm install wordpress-test bitnami/wordpress</p>

<p>I get stuck in EXTERNAL-IP "pending"</p>

<p>$ kubectl get svc --namespace default -w wordpress-test
wordpress-test   LoadBalancer   10.104.15.90   "pending"     80:32577/TCP,443:31388/TCP   102s
<a href="https://i.stack.imgur.com/kJxHk.png" rel="nofollow noreferrer">terminal-screenshot</a></p>

<p>How do I expose the deployment EXTERNAL-IP to some of my available IP (1-Master, 2 Workers) so I can get access to it by going to mydomain.xyz?</p>

<p>I've read about LoadBalancers but most documentation makes reference to big cloud providers such as AWS, GCE, Azure, DigitalOcean, all are out of my scope since I don't even have a credit card to register and make an account.</p>

<p>I need to be able to learn how to deploy it with my own resources so here I'm asking for some help :)</p>

adn
<ol>
<li>You can deploy an ingress controller such as <a href="https://github.com/kubernetes/ingress-nginx/tree/master/deploy/static/provider/baremetal" rel="nofollow noreferrer">nginx</a> and expose the ingress controller via NodePort.Then use an ingress resource to expose the service via the nginx.</li>
</ol>

<hr>

<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
  name: rewrite
  namespace: default
spec:
  rules:
  - host: mydomain.xyz
    http:
      paths:
      - backend:
          serviceName: coffee-svc
          servicePort: 80
</code></pre>

<p>Since the domain <code>mydomain.xyz</code> is not a real domain registered with a DNS provider you could just modify the <code>/etc/hosts</code> file of the system from where you would access it to have the <code>mydomain.xyz</code> to NodeIP mapping.</p>

<ol start="2">
<li>Another option would be to use <a href="https://metallb.universe.tf" rel="nofollow noreferrer">metalLB</a> which is an implementation of LoadBalancer for bare metal without a cloud provider.</li>
</ol>
