github.com/nginxinc/kubernetes-ingress@v1.12.5/deployments/helm-chart/README.md (about)

     1  # NGINX Ingress Controller Helm Chart
     2  
     3  ## Introduction
     4  
     5  This chart deploys the NGINX Ingress controller in your Kubernetes cluster.
     6  
     7  ## Prerequisites
     8  
     9    - A [Kubernetes Version Supported by the Ingress Controller](https://docs.nginx.com/nginx-ingress-controller/technical-specifications/#supported-kubernetes-versions)
    10    - Helm 3.0+.
    11    - Git.
    12    - If you’d like to use NGINX Plus:
    13      - Build an Ingress controller image with NGINX Plus and push it to your private registry by following the instructions from [here](../../build/README.md).
    14      - Update the `controller.image.repository` field of the `values-plus.yaml` accordingly.
    15  
    16  ## Getting the Chart Sources
    17  
    18  This step is required if you're installing the chart using its sources. Additionally, the step is also required for managing the custom resource definitions (CRDs), which the Ingress Controller requires by default, or for upgrading/deleting the CRDs.
    19  
    20  1. Clone the Ingress controller repo:
    21      ```console
    22      $ git clone https://github.com/nginxinc/kubernetes-ingress/
    23      ```
    24  2. Change your working directory to /deployments/helm-chart:
    25      ```console
    26      $ cd kubernetes-ingress/deployments/helm-chart
    27      $ git checkout v1.12.5
    28      ```
    29  
    30  ## Adding the Helm Repository
    31  
    32  This step is required if you're installing the chart via the helm repository.
    33  
    34  ```console
    35  $ helm repo add nginx-stable https://helm.nginx.com/stable
    36  $ helm repo update
    37  ```
    38  
    39  **Note**: If you wish to use the experimental repository, replace `stable` with `edge`.
    40  
    41  ## Installing the Chart
    42  
    43  ### Installing the CRDs
    44  
    45  By default, the Ingress Controller requires a number of custom resource definitions (CRDs) installed in the cluster. The Helm client will install those CRDs.
    46  
    47  If you do not use the custom resources that require those CRDs (which corresponds to `controller.enableCustomResources` set to `false` and `controller.appprotect.enable` set to `false`). The installation of the CRDs can be skipped by specifying `--skip-crds` for the helm install command.
    48  
    49  ### Installing via Helm Repository
    50  
    51  To install the chart with the release name my-release (my-release is the name that you choose):
    52  
    53  For NGINX:
    54  ```console
    55  $ helm install my-release nginx-stable/nginx-ingress
    56  ```
    57  
    58  For NGINX Plus: (assuming you have pushed the Ingress controller image `nginx-plus-ingress` to your private registry `myregistry.example.com`)
    59  ```console
    60  $ helm install my-release nginx-stable/nginx-ingress --set controller.image.repository=myregistry.example.com/nginx-plus-ingress --set controller.nginxplus=true
    61  ```
    62  
    63  **Note**: If you wish to use the experimental repository, replace `stable` with `edge` and add the `--devel` flag.
    64  
    65  ### Installing Using Chart Sources
    66  
    67  To install the chart with the release name my-release (my-release is the name that you choose):
    68  
    69  For NGINX:
    70  ```console
    71  $ helm install my-release .
    72  ```
    73  
    74  For NGINX Plus:
    75  ```console
    76  $ helm install my-release -f values-plus.yaml .
    77  ```
    78  
    79  **Note**: If you wish to use the experimental repository, replace the value in the `tag` field inside the yaml files with `edge`.
    80  
    81  The command deploys the Ingress controller in your Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
    82  
    83  When deploying the Ingress controller, make sure to use your own TLS certificate and key for the default server rather than the default pre-generated ones. Read the [Configuration](#Configuration) section below to see how to configure a TLS certificate and key for the default server. Note that the default server returns the Not Found page with the 404 status code for all requests for domains for which there are no Ingress rules defined.
    84  
    85  ## Upgrading the Chart
    86  
    87  ### Upgrading the CRDs
    88  
    89  Helm does not upgrade the CRDs during a release upgrade. Before you upgrade a release, run the following command to upgrade the CRDs:
    90  
    91  ```console
    92  $ kubectl apply -f crds/
    93  ```
    94  > **Note**: The following warning is expected and can be ignored: `Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply`.
    95  
    96  > **Note**: Make sure to check the [release notes](https://www.github.com/nginxinc/kubernetes-ingress/releases) for a new release for any special upgrade procedures.
    97  
    98  ### Upgrading the Release
    99  
   100  To upgrade the release `my-release`:
   101  
   102  #### Upgrade Using Chart Sources:
   103  
   104  ```console
   105  $ helm upgrade my-release .
   106  ```
   107  
   108  #### Upgrade via Helm Repository:
   109  
   110  ```console
   111  $ helm upgrade my-release nginx-stable/nginx-ingress
   112  ```
   113  
   114  ## Uninstalling the Chart
   115  
   116  ### Uninstalling the Release
   117  
   118  To uninstall/delete the release `my-release`:
   119  
   120  ```console
   121  $ helm uninstall my-release
   122  ```
   123  
   124  The command removes all the Kubernetes components associated with the release and deletes the release.
   125  
   126  ### Uninstalling the CRDs
   127  
   128  Uninstalling the release does not remove the CRDs. To remove the CRDs, run:
   129  
   130  ```console
   131  $ kubectl delete -f crds/
   132  ```
   133  > **Note**: This command will delete all the corresponding custom resources in your cluster across all namespaces. Please ensure there are no custom resources that you want to keep and there are no other Ingress Controller releases running in the cluster.
   134  
   135  ## Running Multiple Ingress Controllers
   136  
   137  If you are running multiple Ingress Controller releases in your cluster with enabled custom resources, the releases will share a single version of the CRDs. As a result, make sure that the Ingress Controller versions match the version of the CRDs. Additionally, when uninstalling a release, ensure that you don’t remove the CRDs until there are no other Ingress Controller releases running in the cluster.
   138  
   139  See [running multiple ingress controllers](https://docs.nginx.com/nginx-ingress-controller/installation/running-multiple-ingress-controllers/) for more details.
   140  
   141  ## Configuration
   142  
   143  The following tables lists the configurable parameters of the NGINX Ingress controller chart and their default values.
   144  
   145  Parameter | Description | Default
   146  --- | --- | ---
   147  `controller.name` | The name of the Ingress controller daemonset or deployment. | Autogenerated
   148  `controller.kind` | The kind of the Ingress controller installation - deployment or daemonset. | deployment
   149  `controller.nginxplus` | Deploys the Ingress controller for NGINX Plus. | false
   150  `controller.nginxReloadTimeout` | The timeout in milliseconds which the Ingress Controller will wait for a successful NGINX reload after a change or at the initial start. The default is 4000 (or 20000 if `controller.appprotect.enable` is true). If set to 0, the default value will be used. | 0
   151  `controller.hostNetwork` | Enables the Ingress controller pods to use the host's network namespace. | false
   152  `controller.nginxDebug` | Enables debugging for NGINX. Uses the `nginx-debug` binary. Requires `error-log-level: debug` in the ConfigMap via `controller.config.entries`. | false
   153  `controller.logLevel` | The log level of the Ingress Controller. | 1
   154  `controller.image.repository` | The image repository of the Ingress controller. | nginx/nginx-ingress
   155  `controller.image.tag` | The tag of the Ingress controller image. | 1.12.5
   156  `controller.image.pullPolicy` | The pull policy for the Ingress controller image. | IfNotPresent
   157  `controller.config.name` | The name of the ConfigMap used by the Ingress controller. | Autogenerated
   158  `controller.config.annotations` | The annotations of the Ingress controller configmap. | {}
   159  `controller.config.entries` | The entries of the ConfigMap for customizing NGINX configuration. See [ConfigMap resource docs](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource/) for the list of supported ConfigMap keys. | {}
   160  `controller.customPorts` | A list of custom ports to expose on the NGINX ingress controller pod. Follows the conventional Kubernetes yaml syntax for container ports. | []
   161  `controller.defaultTLS.cert` | The base64-encoded TLS certificate for the default HTTPS server. If not specified, a pre-generated self-signed certificate is used. **Note:** It is recommended that you specify your own certificate. | A pre-generated self-signed certificate.
   162  `controller.defaultTLS.key` | The base64-encoded TLS key for the default HTTPS server. **Note:** If not specified, a pre-generated key is used. It is recommended that you specify your own key. | A pre-generated key.
   163  `controller.defaultTLS.secret` | The secret with a TLS certificate and key for the default HTTPS server. The value must follow the following format: `<namespace>/<name>`. Used as an alternative to specifying a certificate and key using `controller.defaultTLS.cert` and `controller.defaultTLS.key` parameters. | None
   164  `controller.wildcardTLS.cert` | The base64-encoded TLS certificate for every Ingress host that has TLS enabled but no secret specified. If the parameter is not set, for such Ingress hosts NGINX will break any attempt to establish a TLS connection. | None
   165  `controller.wildcardTLS.key` | The base64-encoded TLS key for every Ingress host that has TLS enabled but no secret specified. If the parameter is not set, for such Ingress hosts NGINX will break any attempt to establish a TLS connection. | None
   166  `controller.wildcardTLS.secret` | The secret with a TLS certificate and key for every Ingress host that has TLS enabled but no secret specified. The value must follow the following format: `<namespace>/<name>`. Used as an alternative to specifying a certificate and key using `controller.wildcardTLS.cert` and `controller.wildcardTLS.key` parameters. | None
   167  `controller.nodeSelector` | The node selector for pod assignment for the Ingress controller pods. | {}
   168  `controller.terminationGracePeriodSeconds` | The termination grace period of the Ingress controller pod. | 30
   169  `controller.tolerations` | The tolerations of the Ingress controller pods. | []
   170  `controller.affinity` | The affinity of the Ingress controller pods. | {}
   171  `controller.volumes` | The volumes of the Ingress controller pods. | []
   172  `controller.volumeMounts` | The volumeMounts of the Ingress controller pods. | []
   173  `controller.resources` | The resources of the Ingress controller pods. | {}
   174  `controller.replicaCount` | The number of replicas of the Ingress controller deployment. | 1
   175  `controller.ingressClass` | A class of the Ingress controller. For Kubernetes >= 1.18, a corresponding IngressClass resource with the name equal to the class must be deployed. Otherwise, the Ingress Controller will fail to start. The Ingress controller only processes resources that belong to its class - i.e. have the "ingressClassName" field resource equal to the class. For Kubernetes < 1.18, the Ingress Controller only processes resources that belong to its class - i.e have the annotation "kubernetes.io/ingress.class" (for Ingress resources) or field "ingressClassName" (for VirtualServer/VirtualServerRoute/TransportServer resources) equal to the class. Additionally, the Ingress Controller processes resources that do not have the class set, which can be disabled by setting the `controller.useIngressClassOnly` parameter to `true`. The Ingress Controller processes all the VirtualServer/VirtualServerRoute/TransportServer resources that do not have the "ingressClassName" field for all versions of kubernetes. | nginx
   176  `controller.useIngressClassOnly` | Ignore Ingress resources without the `"kubernetes.io/ingress.class"` annotation. For kubernetes versions >= 1.18 this flag will be IGNORED. | false
   177  `controller.setAsDefaultIngress` | New Ingresses without an `"ingressClassName"` field specified will be assigned the class specified in `controller.ingressClass`. Only for kubernetes versions >= 1.18. | false
   178  `controller.watchNamespace` | Namespace to watch for Ingress resources. By default the Ingress controller watches all namespaces. | ""
   179  `controller.enableCustomResources` | Enable the custom resources. | true
   180  `controller.enablePreviewPolicies` | Enable preview policies. | false
   181  `controller.enableTLSPassthrough` | Enable TLS Passthrough on port 443. Requires `controller.enableCustomResources`. | false
   182  `controller.globalConfiguration.create` | Creates the GlobalConfiguration custom resource. Requires `controller.enableCustomResources`. | false
   183  `controller.globalConfiguration.spec` | The spec of the GlobalConfiguration for defining the global configuration parameters of the Ingress Controller. | {}
   184  `controller.enableSnippets` | Enable custom NGINX configuration snippets in Ingress, VirtualServer, VirtualServerRoute and TransportServer resources. | false
   185  `controller.healthStatus` | Add a location "/nginx-health" to the default server. The location responds with the 200 status code for any request. Useful for external health-checking of the Ingress controller. | false
   186  `controller.healthStatusURI` | Sets the URI of health status location in the default server. Requires `controller.healthStatus`. | "/nginx-health"
   187  `controller.nginxStatus.enable` | Enable the NGINX stub_status, or the NGINX Plus API. | true
   188  `controller.nginxStatus.port` | Set the port where the NGINX stub_status or the NGINX Plus API is exposed. | 8080
   189  `controller.nginxStatus.allowCidrs` | Add IPv4 IP/CIDR blocks to the allow list for NGINX stub_status or the NGINX Plus API. Separate multiple IP/CIDR by commas. | 127.0.0.1
   190  `controller.priorityClassName` | The PriorityClass of the Ingress controller pods. | None
   191  `controller.service.create` | Creates a service to expose the Ingress controller pods. | true
   192  `controller.service.type` | The type of service to create for the Ingress controller. | LoadBalancer
   193  `controller.service.externalTrafficPolicy` | The externalTrafficPolicy of the service. The value Local preserves the client source IP. | Local
   194  `controller.service.annotations` | The annotations of the Ingress controller service. | {}
   195  `controller.service.extraLabels` | The extra labels of the service. | {}
   196  `controller.service.loadBalancerIP` | The static IP address for the load balancer. Requires `controller.service.type` set to `LoadBalancer`. The cloud provider must support this feature. | ""
   197  `controller.service.externalIPs` | The list of external IPs for the Ingress controller service. | []
   198  `controller.service.loadBalancerSourceRanges` | The IP ranges (CIDR) that are allowed to access the load balancer. Requires `controller.service.type` set to `LoadBalancer`. The cloud provider must support this feature. | []
   199  `controller.service.name` | The name of the service. | Autogenerated
   200  `controller.service.customPorts` | A list of custom ports to expose through the Ingress controller service. Follows the conventional Kubernetes yaml syntax for service ports. | []
   201  `controller.service.httpPort.enable` | Enables the HTTP port for the Ingress controller service. | true
   202  `controller.service.httpPort.port` | The HTTP port of the Ingress controller service. | 80
   203  `controller.service.httpPort.nodePort` | The custom NodePort for the HTTP port. Requires `controller.service.type` set to `NodePort`. | ""
   204  `controller.service.httpPort.targetPort` | The target port of the HTTP port of the Ingress controller service. | 80
   205  `controller.service.httpsPort.enable` | Enables the HTTPS port for the Ingress controller service. | true
   206  `controller.service.httpsPort.port` | The HTTPS port of the Ingress controller service. | 443
   207  `controller.service.httpsPort.nodePort` | The custom NodePort for the HTTPS port. Requires `controller.service.type` set to `NodePort`.  | ""
   208  `controller.service.httpsPort.targetPort` | The target port of the HTTPS port of the Ingress controller service. | 443
   209  `controller.serviceAccount.name` | The name of the service account of the Ingress controller pods. Used for RBAC. | Autogenerated
   210  `controller.serviceAccount.imagePullSecretName` | The name of the secret containing docker registry credentials. Secret must exist in the same namespace as the helm release. | ""
   211  `controller.reportIngressStatus.enable` | Updates the address field in the status of Ingress resources with an external address of the Ingress controller. You must also specify the source of the external address either through an external service via `controller.reportIngressStatus.externalService`, `controller.reportIngressStatus.ingressLink` or the `external-status-address` entry in the ConfigMap via `controller.config.entries`. **Note:** `controller.config.entries.external-status-address` takes precedence over the others. | true
   212  `controller.reportIngressStatus.externalService` | Specifies the name of the service with the type LoadBalancer through which the Ingress controller is exposed externally. The external address of the service is used when reporting the status of Ingress, VirtualServer and VirtualServerRoute resources. `controller.reportIngressStatus.enable` must be set to `true`. The default is autogenerated and enabled when `controller.service.create` is set to `true` and `controller.service.type` is set to `LoadBalancer`. | Autogenerated
   213  `controller.reportIngressStatus.ingressLink` |  Specifies the name of the IngressLink resource, which exposes the Ingress Controller pods via a BIG-IP system. The IP of the BIG-IP system is used when reporting the status of Ingress, VirtualServer and VirtualServerRoute resources. `controller.reportIngressStatus.enable` must be set to `true`. | ""
   214  `controller.reportIngressStatus.enableLeaderElection` | Enable Leader election to avoid multiple replicas of the controller reporting the status of Ingress resources. `controller.reportIngressStatus.enable` must be set to `true`. | true
   215  `controller.reportIngressStatus.leaderElectionLockName` | Specifies the name of the ConfigMap, within the same namespace as the controller, used as the lock for leader election. controller.reportIngressStatus.enableLeaderElection must be set to true. | Autogenerated
   216  `controller.reportIngressStatus.annotations` | The annotations of the leader election configmap. | {}
   217  `controller.pod.annotations` | The annotations of the Ingress Controller pod. | {}
   218  `controller.appprotect.enable` | Enables the App Protect module in the Ingress Controller. | false
   219  `controller.readyStatus.enable` | Enables the readiness endpoint `"/nginx-ready"`. The endpoint returns a success code when NGINX has loaded all the config after the startup. This also configures a readiness probe for the Ingress Controller pods that uses the readiness endpoint. | true
   220  `controller.readyStatus.port` | The HTTP port for the readiness endpoint. | 8081
   221  `controller.enableLatencyMetrics` |  Enable collection of latency metrics for upstreams. Requires `prometheus.create`. | false
   222  `rbac.create` | Configures RBAC. | true
   223  `prometheus.create` | Expose NGINX or NGINX Plus metrics in the Prometheus format. | false
   224  `prometheus.port` | Configures the port to scrape the metrics. | 9113
   225  `prometheus.scheme` | Configures the HTTP scheme to use for connections to the Prometheus endpoint. | http
   226  `prometheus.secret` | The namespace / name of a Kubernetes TLS Secret. If specified, this secret is used to secure the Prometheus endpoint with TLS connections. | ""
   227  
   228  
   229  ## Notes
   230  * The values-icp.yaml file is used for deploying the Ingress controller on IBM Cloud Private. See the [blog post](https://www.nginx.com/blog/nginx-ingress-controller-ibm-cloud-private/) for more details.