-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rke2-ingress-nginx does not watch Ingress resources without IngressClassName set #6510
Comments
Can you provide an example showing how exactly you'd configured the ingress settings? What specifically was missing? |
The reason fro this issue is missing annotation
|
That should be handled when the chart is upgraded, via the |
Yes, I have customized helm chart od nginx ingress. Here the customized helm chart config:
Section |
Please show the helmchart, not the helmchartconfig |
Here the output of
|
Your chart's rke2/pkg/bootstrap/bootstrap.go Lines 312 to 323 in e742dc5
What is the output of root@rke2-server-1:/# grep -E 'chart-url|global' /var/lib/rancher/rke2/server/manifests/rke2-ingress-nginx.yaml
helm.cattle.io/chart-url: https://rke2-charts.rancher.io/assets/rke2-ingress-nginx/rke2-ingress-nginx-4.10.102.tgz
global.clusterCIDR: 10.42.0.0/16
global.clusterCIDRv4: 10.42.0.0/16
global.clusterDNS: 10.43.0.10
global.clusterDomain: cluster.local
global.rke2DataDir: /var/lib/rancher/rke2
global.serviceCIDR: 10.43.0.0/16
global.systemDefaultIngressClass: ingress-nginx If you see the If you don't see it there... then something else weird is going on, and we'll want to look at your server's config.yaml. |
|
And you're sure you're on v1.30.3+rke2rk1 on all your nodes? Can you provide rke2-server logs from journald? |
No, my cluster is on v1.28.8+rke2r1. I just tried to upgrade first master node to v1.30.3+rke2rk1. The upgrade has triggered nginx-ingress upgrade to v1.10.1-hardened1. After nginx-ingress upgrade, no ingress rule was working. I received error 404 for all requests, because no rule had ingress class set and there was no default ingress class. After that I decided to downgrade the node to v1.28.8+rke2r1 (there was second issue with not working modesecurity and it was too much for me). Downgrade triggered nginx-ingress helm chart downgrade to nginx-1.9.6-hardened1 and everything is working now. |
This is the first time you've mentioned that you are no longer running the version you listed when creating the issue. It would have been good to mention that, as none of the information I asked for is going to be of any use if you're not running the new version any longer.
rke2-ingress-nginx should have been set as the default ingress class by the chart value I was having you check for. |
I have upgraded to version v1.30.3. I checked the Nginx configuration in the Ingress, and there is no domain that I cannot access in the configuration, but it indeed configured the Ingress. My solution is to recreate the Ingress configuration. |
Here is a comparison between the configurations of the two versions.
Here is the comparison of the Ingress configuration after the upgrade.
|
Are you upgrading directly from v1.28.10 to v1.30.3? That is not supported, you are expected to step through intermediate minors (v1.27) when upgrading. I am not sure that's related though. Please see the information that was asked for above, regarding the HelmChart resource, both on disk and in the cluster. |
@brandond after upgrading to RKE2 v1.30.3 +rke2r1 I'm also facing this issue. I checked ingress storage class and it has apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
annotations:
ingressclass.kubernetes.io/is-default-class: 'true'
meta.helm.sh/release-name: rke2-ingress-nginx
meta.helm.sh/release-namespace: kube-system
creationTimestamp: '2024-01-25T22:48:15Z'
generation: 1
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: rke2-ingress-nginx
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: rke2-ingress-nginx
app.kubernetes.io/part-of: rke2-ingress-nginx
app.kubernetes.io/version: 1.10.1
helm.sh/chart: rke2-ingress-nginx-4.10.102
managedFields:
- apiVersion: networking.k8s.io/v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:ingressclass.kubernetes.io/is-default-class: {}
f:meta.helm.sh/release-name: {}
f:meta.helm.sh/release-namespace: {}
f:labels:
.: {}
f:app.kubernetes.io/component: {}
f:app.kubernetes.io/instance: {}
f:app.kubernetes.io/managed-by: {}
f:app.kubernetes.io/name: {}
f:app.kubernetes.io/part-of: {}
f:app.kubernetes.io/version: {}
f:helm.sh/chart: {}
f:spec:
f:controller: {}
manager: helm
operation: Update
time: '2024-08-26T20:10:50Z'
name: nginx
resourceVersion: '196680132'
uid: 93ef06ed-bf17-4c2f-aa1a-0a4619cf1f62
spec:
controller: k8s.io/ingress-nginx |
In newer releases of RKE2, the ingress-nginx IngressClass is set as default, and any new Ingress resources created on these versions will have the ingressClassName assigned during creation, if the attribute is not set. If you're upgrading from earlier releases, and did not explicitly set the ingressClassName on your Ingress resources, the default ingress class WILL NOT be set on your existing resources, and on affected releases of RKE2, ingress-nginx will no longer handle these Ingresses. The fix is to either:
|
Validated the fixes on the latest releases, closing this issue. |
Environmental Info:
RKE2 Version: v1.30.3
rke2 version v1.30.3+rke2r1
go version go1.22.5 X:boringcrypto
Node(s) CPU architecture, OS, and Version:
arm64 centos 7.9
Cluster Configuration:
1 server 3 agents
Describe the bug:
After upgrading from RKE2 v1.29.7 to v1.30.3, services within the Kubernetes cluster that are accessed through Ingress are returning 404 errors.
Steps To Reproduce:
Expected behavior:
Actual behavior:
Additional context / logs:
The text was updated successfully, but these errors were encountered: