Closed tgeci closed 2 years ago
@tgeci: This issue is currently awaiting triage.
If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
There is a major change between version 0.x.x. of the controller and version 1.x.x of the controller.
I am able to use the controller version 1.x.x in Kubernetes version 1.22.x without the --ingress-class
flag.
Please check the faq section in docs https://kubernetes.github.io/ingress-nginx/#faq-migration-to-apiversion-networkingk8siov1
Please describe how that flag impacts you and what is the high level description of the problem you are trying to solve.
Maybe the docs needs to be improved in some way.
We can know more after your update
/remove-kind bug /kind support /triage needs-information
Hi @longwuyuan, thanks for your fast reply.
My issue is that I want to deploy two ingress-controllers in my cluster. One public accessible and the other restricted to IPs by loadBalancerSourceRanges:
.
By setting the annotation kubernetes.io/ingress.class: ingress-nginx-public
I want to map only certain ingress resources to the public ingress. Without setting --ingress-class
flag all ingress resources are added because the controller matches kubernetes.io/ingress.class: ingress-nginx-public
I am open to other annotations to select the correct ingress.
Does this link help in any way https://kubernetes.github.io/ingress-nginx/#how-to-easily-install-multiple-instances-of-the-ingress-nginx-controller-in-the-same-cluster
On Mon, Oct 18, 2021 at 7:38 PM Taulant Geci @.***> wrote:
Hi @longwuyuan https://github.com/longwuyuan, thanks for your fast reply.
My issue is that I want to deploy two ingress-controllers in my cluster. One public accessible and the other restricted to IPs by loadBalancerSourceRanges:.
By setting the annotation kubernetes.io/ingress.class: ingress-nginx-public I want to map only certain ingress resources to the public ingress. Without setting --ingress-class flag all ingress resources are added because the controller matches kubernetes.io/ingress.class: ingress-nginx-public
I am open to other annotations to select the correct ingress.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kubernetes/ingress-nginx/issues/7820#issuecomment-945811028, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGZVWRND2GTX62RDYC6RATUHQS4TANCNFSM5GGUUZKA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- ; Long Wu Yuan
I just tried out and can confirm thats working. The log output is a bit confusing. Reading the log lines it looks like all Ingress resources are loaded:
I1018 14:40:20.865117 8 backend_ssl.go:66] "Adding secret to local store" name="***REDACTED***"
I1018 14:40:20.865150 8 store.go:371] "Found valid IngressClass" ingress="ci/sonarqube-sonarqube" ingressclass="nginx"
I1018 14:40:20.865242 8 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"ci", Name:"sonarqube-sonarqube", UID:"ba0190a3-688f-4723-87f4-8978a9917b3c", APIVersion:"networking.k8s.io/v1", ResourceVersion:"8642631", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
I1018 14:40:20.865421 8 backend_ssl.go:66] "Adding secret to local store" name="***REDACTED***"
I1018 14:40:20.865456 8 store.go:371] "Found valid IngressClass" ingress="ci/harbor-ingress-notary" ingressclass="nginx"
I1018 14:40:20.865595 8 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"ci", Name:"harbor-ingress-notary", UID:"c3721f22-59c8-4061-a796-5ef9bb1e28ad", APIVersion:"networking.k8s.io/v1", ResourceVersion:"6777336", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
I1018 14:40:20.865752 8 backend_ssl.go:66] "Adding secret to local store" name="***REDACTED***"
I1018 14:40:20.865782 8 store.go:371] "Found valid IngressClass" ingress="sso/auth-public" ingressclass="ingress-nginx-public"
I1018 14:40:20.865944 8 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"sso", Name:"auth-public", UID:"b3d67dbd-5f0c-4c7f-9772-f361e5a3f7dd", APIVersion:"networking.k8s.io/v1", ResourceVersion:"8789092", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
I1018 14:40:20.866002 8 backend_ssl.go:66] "Adding secret to local store" name="***REDACTED***"
I1018 14:40:20.866034 8 store.go:371] "Found valid IngressClass" ingress="ci/gitlab-webservice-default" ingressclass="nginx"
I1018 14:40:20.866187 8 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"ci", Name:"gitlab-webservice-default", UID:"354daa50-4d81-4646-baa0-13064cc620c3", APIVersion:"networking.k8s.io/v1", ResourceVersion:"6774562", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
I1018 14:40:20.866300 8 backend_ssl.go:66] "Adding secret to local store" name="***REDACTED***"
I1018 14:40:20.866327 8 store.go:371] "Found valid IngressClass" ingress="ci/harbor-ingress" ingressclass="nginx"
I1018 14:40:20.866509 8 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"ci", Name:"harbor-ingress", UID:"de4cbb0b-6c39-484f-ac39-7940c8c7acb6", APIVersion:"networking.k8s.io/v1", ResourceVersion:"6777337", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
I1018 14:40:20.866574 8 backend_ssl.go:66] "Adding secret to local store" name="***REDACTED***"
I1018 14:40:20.866598 8 store.go:371] "Found valid IngressClass" ingress="monitoring/grafana" ingressclass="nginx"
I1018 14:40:20.866765 8 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"monitoring", Name:"grafana", UID:"ae5cbbc8-57df-420e-bb07-64058a8457a9", APIVersion:"networking.k8s.io/v1", ResourceVersion:"6830753", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
I1018 14:40:20.866882 8 backend_ssl.go:66] "Adding secret to local store" name="***REDACTED***"
I1018 14:40:20.866911 8 store.go:371] "Found valid IngressClass" ingress="ci/gitlab-minio" ingressclass="nginx"
I1018 14:40:20.867049 8 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"ci", Name:"gitlab-minio", UID:"146f91a4-2186-40db-b082-953e2cbd9d47", APIVersion:"networking.k8s.io/v1", ResourceVersion:"6774561", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
Even more confusing is that the affected ingress resource is reachable, but the via kubectl get ingress
the assigned LB IP is not shown in ADDRESS
column.
But as said works as described in the doc. Confusing but runs.
Now that my setup has been running for a few days, I'm sticking to the idea that the missing ingress class argument is a problem. All upstream helm charts must have the parameter ingressClass:
set. Many of them don't even have it in the template.
I will switch to chart version 3.39.0 where the --ingress-class is set.
I agree with @tgeci
I tried to install a second nginx ingress on Azure, and the only way to get it working was to use the k8s yaml instead of the helm chart. I also tried setting extraArgs
but that didn't work either for me.
I think this is a rather common case and the two documentation links I found (https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/ and https://kubernetes.github.io/ingress-nginx/#how-to-easily-install-multiple-instances-of-the-ingress-nginx-controller-in-the-same-cluster) both didn't work the way I would have expected (i.e. to have a new ingress class that works)
I got backward compatibilty with (deprecated) annotation, setting "--ingress-class" parameter by extraArgs in values.yaml. In the meanwhile, I will try to migrate our ingresses to more standard "spec.ingressClassName" and then remove "--ingress-class".
A nightmare.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
@k8s-triage-robot: Closing this issue.
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
Kubernetes version :
v1.21.5
Environment: Managed private cloud setup
Helm release information:
Current State of the controller:
What happened: By helm was created a deployment with the following container arguments:
There is the arg
--ingress-class=ingress-nginx-public
missing. It was set in the values.yaml with the following properties:What you expected to happen: A deployment with the following container arguments:
It doesn't work even if I set the
extraArgs
in the helm file. SettingextraArgs
to--ingress-class=ingress-nginx-public
leads in a CrashLoopback because of0=
character in the generated args:- --0=ingress-class=ingress-nginx-public
In helm chart version
3.39.0
setting theingressClass
in values.yaml works fine and generates correct args./kind bug