tencent cloud

masukan

Installing Multiple Nginx Ingress Controllers

Terakhir diperbarui: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
    
    
    Hubungi Kami

    Hubungi tim penjualan atau penasihat bisnis kami untuk membantu bisnis Anda.

    Dukungan Teknis

    Buka tiket jika Anda mencari bantuan lebih lanjut. Tiket kami tersedia 7x24.

    Dukungan Telepon 7x24