# RKE2 and Nginx Ingress Controller

**URL:** <https://forums.suse.com/t/rke2-and-nginx-ingress-controller/19057>\
**Category:** SUSE Rancher Prime\
**Created:** [December 18, 2020, 6:35am UTC](https://forums.suse.com/t/rke2-and-nginx-ingress-controller/19057 "2020-12-18T06:35:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![torquemada163](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/torquemada163/32/6991_2.png) [@torquemada163](https://forums.suse.com/u/torquemada163)\
**Post date:** [December 18, 2020, 6:35am UTC](https://forums.suse.com/t/rke2-and-nginx-ingress-controller/19057/1 "2020-12-18T06:35:31Z")

</div>

Hello!  
I have an RKE2 cluster that consists of 3 masters and 3 workers. Installed according to the documentation. I empirically found that the Nginx Ingress Controller is available only on Master 1. Can I make it available on other masters?

```auto
└─# kubectl get nodes
NAME STATUS ROLES AGE VERSION
cuba-kub-01 Ready etcd,master 45d v1.18.10+rke2r1
cuba-kub-02 Ready etcd,master 44d v1.18.10+rke2r1
cuba-kub-03 Ready etcd,master 44d v1.18.10+rke2r1
cuba-kub-04 Ready node 44d v1.18.10+rke2r1
cuba-kub-05 Ready node 44d v1.18.10+rke2r1
cuba-kub-06 Ready node 44d v1.18.10+rke2r1

```

 ![image (1)](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/a/a34cd5bcb360ff958106e6315147da567f53ab2a.png)

---

<div class="post-metadata">

**Author:** ![seimic](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/seimic/32/6370_2.png) [@seimic](https://forums.suse.com/u/seimic)\
**Post date:** [June 4, 2021, 11:04am UTC](https://forums.suse.com/t/rke2-and-nginx-ingress-controller/19057/2 "2021-06-04T11:04:09Z")

</div>

Hi,

just playing around with rke2 too (nice new toy, looks promising). This is an old topic but maybe someone needs a solution for this too. If I got it right, the way to do it is to write a HelmChartConfig into the manifest directory.  
I suppose it will only work if at least three master nodes are in the cluster. Until then, the replica set  
remains in pending state.

(See answer from brandond here: [HelmChartConfig modifications not taking effect · Issue #663 · rancher/rke2 · GitHub](https://github.com/rancher/rke2/issues/663#issuecomment-761195174))

```auto
sudo tee /var/lib/rancher/rke2/server/manifests/rke2-ingress-nginx-config.yaml >> /dev/null << EOF
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: rke2-ingress-nginx
  namespace: kube-system
spec:
  valuesContent: |-
    controller:
      nodeSelector:
        node-role.kubernetes.io/master: "true"
      replicaCount: 3
EOF

```

Or in a running cluster just to scale the deployment: [Deployments | Kubernetes](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#scaling-a-deployment)

Kind regards,  
Michael

---

<div class="post-metadata">

**Author:** ![wcoateRR](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/wcoaterr/32/8144_2.png) [@wcoateRR](https://forums.suse.com/u/wcoateRR)\
**Post date:** [October 20, 2021, 6:28pm UTC](https://forums.suse.com/t/rke2-and-nginx-ingress-controller/19057/3 "2021-10-20T18:28:10Z")

</div>

Is this step on the setting up HA RKE2 for Rancher what you’re looking for?

> **[Setting up a High-availability RKE2 Kubernetes Cluster for Rancher](https://rancher.com/docs/rancher/v2.6/en/installation/resources/k8s-tutorials/ha-rke2/#5-configure-nginx-to-be-a-daemonset)**

Forgot about the expansion, but step name is “Configure nginx to be a daemonset”. I didn’t find it necessary using RKE2 with Kubernetes 1.21 as it was already a daemonset, but maybe this is what you wanted?

---

<div class="post-metadata">

**Author:** ![silvermind](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/silvermind/32/8930_2.png) [@silvermind](https://forums.suse.com/u/silvermind)\
**Post date:** [May 2, 2022, 12:12am UTC](https://forums.suse.com/t/rke2-and-nginx-ingress-controller/19057/4 "2022-05-02T00:12:16Z")

</div>

thanks for the link @wcoateRR  
Do you know where I can modify these HelmChartConfig Settings in an already deployed RKE2 Cluster managed by Rancher (RKE2 Tech Preview)?

- are they on the Cluster Config itself ?

My Goal is to Edit the rke2-ingress-nginx HelmChartConfig  
allowed Values: [ingress-nginx/values.yaml at main · kubernetes/ingress-nginx · GitHub](https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml#L396-L397)

* * *

- [rke2-charts/packages/rke2-ingress-nginx at main-source · rancher/rke2-charts · GitHub](https://github.com/rancher/rke2-charts/tree/main-source/packages/rke2-ingress-nginx)
- [rke2-charts/values.yaml.patch at main-source · rancher/rke2-charts · GitHub](https://github.com/rancher/rke2-charts/blob/main-source/packages/rke2-ingress-nginx/generated-changes/patch/values.yaml.patch)

---

<div class="post-metadata">

**Author:** ![wcoateRR](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/wcoaterr/32/8144_2.png) [@wcoateRR](https://forums.suse.com/u/wcoateRR)\
**Post date:** [May 2, 2022, 1:09pm UTC](https://forums.suse.com/t/rke2-and-nginx-ingress-controller/19057/5 "2022-05-02T13:09:25Z")

</div>

That’s nothing I’ve done so not sure what I could tell you.

If you want to modify what’s in the git repos for the defaults you might need to look at the Air Gap instructions for how to set Rancher to use a personal docker repo & presumably git repo for defaults for fleet.

However, rke2-ingress-nginx is installed by default with RKE2 via RPM or TAR, so you’d have to change things in you config.yaml with the RPM install method to avoid it or change it as far as I understand. If you want to do that I think the safest thing to do is find the option to say not to install rke2-ingress-nginx at all and then manually install it from where you point it at after, but that’s just a guess.

There are more Rancher employees active on Slack than here, so you might try the #rke2 channel over there.
