https://rancher.com/ logo
Title
a

ambitious-plastic-3551

06/29/2022, 4:04 PM
Hello! I have installed rke2 with 3 nodes, everything works fine, but adding additional ingress-es with different ingressClassName still just shows the nginx 404 error page, am I understanding correctly when I add other ingress controllers it should use them?
@fierce-summer-6167 this one
f

fierce-summer-6167

06/30/2022, 7:34 PM
Do you know why you're seeing a 404 and not 503?
a

ambitious-plastic-3551

06/30/2022, 7:35 PM
yes, because rke2 is "default" one directly listening on the 80,443 ports
f

fierce-summer-6167

06/30/2022, 7:35 PM
What is the ingress type?
a

ambitious-plastic-3551

06/30/2022, 7:36 PM
I installed two more controllers, traefik and apisix, but if I set Ingress with that class to some resource it's still nginx 404
so basically Ingress in this fashion has no effect
f

fierce-summer-6167

06/30/2022, 7:39 PM
Ah. I meant the ingress service type.
a

ambitious-plastic-3551

06/30/2022, 7:40 PM
I have NodePort mostly
f

fierce-summer-6167

06/30/2022, 7:40 PM
If it's a NodePort, are you checking the NodePort? If it's a LoadBalancer, are you checking the load balancer endpoint?
a

ambitious-plastic-3551

06/30/2022, 7:40 PM
even though I would prefer ClusterIP
f

fierce-summer-6167

06/30/2022, 7:40 PM
ClusterIP is local to the cluster.
a

ambitious-plastic-3551

06/30/2022, 7:41 PM
But currently I don't get it what I need to achieve this, or how this class is working
For me ingress is something like you have a reverse proxy and then it checks a class, and find the suitable service
f

fierce-summer-6167

06/30/2022, 7:44 PM
It sounds like in your case that if you're trying to determine if the ingress is working correctly, you'll have to query the nodeport of the service.
Are you doing that, or ports 80/443? Are they the service ports for one of your ingresses?
a

ambitious-plastic-3551

06/30/2022, 7:45 PM
I think rke2-ingress-nginx is doing the hostPort
## Use host ports 80 and 443 ## Disabled by default hostPort: # -- Enable 'hostPort' or not enabled: true ports: # -- 'hostPort' http port http: 80 # -- 'hostPort' https port https: 443
f

fierce-summer-6167

06/30/2022, 7:48 PM
You're looking for something like: kubectl get services --namespace <ingress namespace>
a

ambitious-plastic-3551

06/30/2022, 7:48 PM
So my question is... can I even achieve this ingress thing to be more configurable just within Kubernetes, and what steps/measures...
nginx isn't even in let's say exception admission clusterip
f

fierce-summer-6167

06/30/2022, 7:51 PM
Yes, but I've never done it. We've deployed NGINX Ingress controller and Istio (for example, but Istio is not an ingress controller) on the same cluster, but not multiple ingresses. The Kubernetes project has some documentation here: https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/
Sounds like you were on the right track with ingress classes.
a

ambitious-plastic-3551

06/30/2022, 7:56 PM
as a workaround I can use existing Ingress to forward traffic, but is manual job
Thank you for the input