tencent cloud

Feedback

Installing Multiple Nginx Ingress Controllers

Last updated: 2024-08-12 17:48:23

    Overview

    If you need to deploy multiple Nginx Ingress Controllers, that is, you want to use different traffic entries with different Ingress rules:
    
    You can deploy multiple Nginx Ingress Controllers for the cluster and specify different ingressClassName for different Ingresses.
    This document describes the configuration methods for installing multiple Nginx Ingress Controllers.

    Configuration Method

    To install multiple Nginx Ingress Controllers, you need to specify ingressClassName in values.yaml (ensure there are no conflicts):
    controller:
    ingressClassName: prod
    ingressClassResource:
    name: prod
    controllerValue: k8s.io/ingress-prod
    Note:
    Three fields need to be changed simultaneously.
    Additionally, the release names for multiple instances must be different from those of installed ones. Even if the namespaces are different, the release names cannot be the same (to avoid ClusterRole conflicts). The sample code is as follows:
    helm upgrade --install prod ingress-nginx/ingress-nginx \\
    --namespace ingress-nginx --create-namespace \\
    -f values.yaml
    When creating Ingress resources, you also need to specify the corresponding ingressClassName:
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
    name: nginx
    spec:
    ingressClassName: prod
    rules:
    - http:
    paths:
    - path: /
    pathType: Prefix
    backend:
    service:
    name: nginx
    port:
    number: 80
    
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support