# Baremetal ingress hostNetwork + add node worker

**URL:** https://discuss.kubernetes.io/t/baremetal-ingress-hostnetwork-add-node-worker/20797
**Category:** microk8s
**Created:** [July 30, 2022, 6:55pm UTC](https://discuss.kubernetes.io/t/baremetal-ingress-hostnetwork-add-node-worker/20797 "2022-07-30T18:55:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jjg](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@jjg](https://discuss.kubernetes.io/u/jjg)
#### Post date: [July 30, 2022, 6:55pm UTC](https://discuss.kubernetes.io/t/baremetal-ingress-hostnetwork-add-node-worker/20797/1 "2022-07-30T18:55:50Z")

</div>

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](https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network).

My question, will the hostPort get messed up if I

```auto
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.

---

<div class="post-metadata">

### Author: ![balchua1](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/balchua1/32/5372_2.png) [@balchua1](https://discuss.kubernetes.io/u/balchua1)
#### Post date: [July 30, 2022, 10:32pm UTC](https://discuss.kubernetes.io/t/baremetal-ingress-hostnetwork-add-node-worker/20797/2 "2022-07-30T22:32:16Z")

</div>

As far as i understand, if the worker node is not facing the outside world, the ingress on that worker node is going to do nothing.

---

<div class="post-metadata">

### Author: ![jjg](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@jjg](https://discuss.kubernetes.io/u/jjg)
#### Post date: [August 1, 2022, 11:20am UTC](https://discuss.kubernetes.io/t/baremetal-ingress-hostnetwork-add-node-worker/20797/3 "2022-08-01T11:20:24Z")

</div>

[balchua1](https://discuss.kubernetes.io/u/balchua1) thank you

---

<div class="post-metadata">

### Author: ![Theog75](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/theog75/32/9241_2.png) [@Theog75](https://discuss.kubernetes.io/u/Theog75)
#### Post date: [August 27, 2022, 10:48am UTC](https://discuss.kubernetes.io/t/baremetal-ingress-hostnetwork-add-node-worker/20797/4 "2022-08-27T10:48:23Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jjg](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@jjg](https://discuss.kubernetes.io/u/jjg)
#### Post date: [August 27, 2022, 1:47pm UTC](https://discuss.kubernetes.io/t/baremetal-ingress-hostnetwork-add-node-worker/20797/5 "2022-08-27T13:47:16Z")

</div>

In my case, it is the ingress I am configuring.

`microk8s kubectl edit daemonset nginx-ingress-microk8s-controller -n ingress`

to add **hostNetwork: true**

So a single router to a single ingress feels ok.
