kubernetes-ingress icon indicating copy to clipboard operation
kubernetes-ingress copied to clipboard

Running Multiple Ingress Controllers?

Open JokerDevops opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe.

When I install multiple nginx ingress controllers on a cluster, the ingress class shares a controller. As a result, the contents processed by the two ingressclasses are the same.

image

Describe the solution you'd like I hope I can specify the controller of ingressclass. Separate them.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

JokerDevops avatar Apr 13 '22 06:04 JokerDevops

Hi @JokerDevops thanks for reporting!

Be sure to check out the docs while you wait for a human to take a look at this :slightly_smiling_face:

Cheers!

github-actions[bot] avatar Apr 13 '22 06:04 github-actions[bot]

Have you discovered this: https://docs.nginx.com/nginx-ingress-controller/installation/running-multiple-ingress-controllers/

brianehlert avatar Apr 13 '22 14:04 brianehlert

@brianehlert I configured it according to this document, but found that the controller field is fixed. When I create two ingress classes, they share the same controller.

spec:
  controller: nginx.org/ingress-controller
{{- if semverCompare ">=1.18.0-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1beta1
kind: IngressClass
metadata:
  name: {{ .Values.controller.ingressClass }}
{{- if .Values.controller.setAsDefaultIngress }}
  annotations:
    ingressclass.kubernetes.io/is-default-class: "true"
{{- end }}
spec:
  controller: nginx.org/ingress-controller
{{- end }}

JokerDevops avatar Apr 14 '22 08:04 JokerDevops

@JokerDevops That is correct. However:

A very important item to remember is the Ingress controller **only processes resources that belong to its class** 

Make sure you define your applications with the ingressClass you want that application to be attached to.

jasonwilliams14 avatar Apr 14 '22 16:04 jasonwilliams14

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Sep 21 '23 01:09 github-actions[bot]

This issue was closed because it has been stalled for 10 days with no activity.

github-actions[bot] avatar Oct 01 '23 01:10 github-actions[bot]