# Add on:ingress default port change options

**URL:** <https://discuss.kubernetes.io/t/add-on-ingress-default-port-change-options/14428>\
**Category:** microk8s\
**Created:** [January 11, 2021, 3:07am UTC](https://discuss.kubernetes.io/t/add-on-ingress-default-port-change-options/14428 "2021-01-11T03:07:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![srinijalagam](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@srinijalagam](https://discuss.kubernetes.io/u/srinijalagam)\
**Post date:** [January 11, 2021, 3:07am UTC](https://discuss.kubernetes.io/t/add-on-ingress-default-port-change-options/14428/1 "2021-01-11T03:07:23Z")

</div>

Hi all,  
I am using add on ingress , I have requirement to allow to change ingress ports as default ports are not safe to use in production.

i am trying to find out what steps to be followed for add on ingress port change.

and also is it possible to have port per each backend service ?

any recommendations for the above two are would be great help.

---

<div class="post-metadata">

**Author:** ![kjackal](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/kjackal/32/1750_2.png) [@kjackal](https://discuss.kubernetes.io/u/kjackal)\
**Post date:** [January 11, 2021, 9:29am UTC](https://discuss.kubernetes.io/t/add-on-ingress-default-port-change-options/14428/2 "2021-01-11T09:29:17Z")

</div>

Hi @srinijalagam

> [@srinijalagam](#):
>
> i am trying to find out what steps to be followed for add on ingress port change.

You should be able to change the port by editing the respective manifest after enabling the ingress addon:

```auto
microk8s kubectl edit -n ingress daemonset.apps/nginx-ingress-microk8s-controller

```

> [@srinijalagam](#):
>
> and also is it possible to have port per each backend service ?

If I understand correctly what you need, you may want to have multiple ingress controllers for this [1].

[1] [Multiple Ingress controllers - Ingress-Nginx Controller](https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/)

---

<div class="post-metadata">

**Author:** ![srinijalagam](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@srinijalagam](https://discuss.kubernetes.io/u/srinijalagam)\
**Post date:** [January 12, 2021, 6:42pm UTC](https://discuss.kubernetes.io/t/add-on-ingress-default-port-change-options/14428/3 "2021-01-12T18:42:49Z")

</div>

thank you @kjackal for your recommendations, I have tried kubectl edit it works great.

I have tried to below as patch  
kubectl patch -n ingress daemonset.apps/nginx-ingress-microk8s-controller -p ‘{“apiVersion”:“apps/v1”,“kind”:“DaemonSet”,“spec”:{“spec”:{“containers”:[{“name”:“nginx-ingress-microk8s”,“ports”:[{“containerPort”:80,“hostPort”:85,“protocol”:“TCP”},{“containerPort”:443,“hostPort”:445,“protocol”:“TCP”}]}],“hostNetwork”:false}}}’

I do see below  
daemonset.apps/nginx-ingress-microk8s-controller patched (no change)

not sure why its not effecting the change , not sure what is it i am missing here
