I have been using microk8s for quite a while to host my website containing
many micro-services. Thank you Canonical for Microk8s, it works great even with my
GPU microservices.
I have a fixed IP provided to my home by the ISP, and since I have just one node, I opted for
using hostNetwork as per baremetal/#via-the-host-network.
My question, will the hostPort get messed up if I
microk8s add-node --worker
My concern is that the ingress ends up running on the worker and therefore stops using the fixed IP of the control node. I would rather not deal with the extra complexity of MetalB for just 2 nodes.
basically when you use hostNetwork - the Pod will use the networking stack and network interface of the node itself.
this exposes the app inside the Pod directly to whoever is communicating with it.
in addition, you will “loose” all the load balancing abilities and service discovery (if you need those) that come with using:
client->ingrress->service->Pod X,Pod Y,Pod Z
last point - if you would want to scale you application or move it to a bigger cluster, you will have technical depth as exposing a node in a a cluster is bad practice.