nginx-edge/nginx-ingress

Chart version: 0.0.0-edge
Api version: v1
App version: 0.0.0-edge
NGINX Ingress Controller
application
Chart Type
Active
Status
Unknown
License
31
Downloads
https://helm.nginx.com/edge
Set me up:
helm repo add center https://repo.chartcenter.io
Install Chart:
helm install nginx-ingress center/nginx-edge/nginx-ingress
Versions (0)

NGINX Ingress Controller Helm Chart

Introduction

This chart deploys the NGINX Ingress controller in your Kubernetes cluster.

Prerequisites

  • Kubernetes 1.12+.
  • Helm 2.8.x+.
  • Git.
  • If you’d like to use NGINX Plus:
    • Build an Ingress controller image with NGINX Plus and push it to your private registry by following the instructions from here.
    • Update the controller.image.repository field of the values-plus.yaml accordingly.

Installing the Chart

Installing via Helm Repository

  1. Add NGINX Helm repository:

    $ helm repo add nginx-edge https://helm.nginx.com/edge
    $ helm repo update
    
  2. To install the chart with the release name my-release (my-release is the name that you choose):

    • Using Helm 3.x client:

      For NGINX:

      $ helm install my-release nginx-edge/nginx-ingress
      

      For NGINX Plus: (assuming you have pushed the Ingress controller image nginx-plus-ingress to your private registry myregistry.example.com)

      $ helm install my-release nginx-edge/nginx-ingress --set controller.image.repository=myregistry.example.com/nginx-plus-ingress --set controller.nginxplus=true
      
    • Using Helm 2.x client:

      For NGINX:

      $ helm install --name my-release nginx-edge/nginx-ingress
      

      For NGINX Plus: (assuming you have pushed the Ingress controller image nginx-plus-ingress to your private registry myregistry.example.com)

      $ helm install --name my-release nginx-edge/nginx-ingress --set controller.image.repository=myregistry.example.com/nginx-plus-ingress --set controller.nginxplus=true
      

Installing Using Chart Sources

  1. Clone the Ingress controller repo:

    $ git clone https://github.com/nginxinc/kubernetes-ingress/
    
    1. Change your working directory to /deployments/helm-chart: console $ cd kubernetes-ingress/deployments/helm-chart
  2. To install the chart with the release name my-release (my-release is the name that you choose):

    • Using Helm 3.x client:

      For NGINX:

      $ helm install my-release .
      

      For NGINX Plus:

      $ helm install my-release -f values-plus.yaml .
      
    • Using Helm 2.x client:

      For NGINX:

      $ helm install --name my-release .
      

      For NGINX Plus:

      $ helm install --name my-release -f values-plus.yaml .
      

    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.

    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 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.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the release my-release

  • Using Helm 3.x client:

    $ helm uninstall my-release
    
    • Using Helm 2.x client: console $ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following tables lists the configurable parameters of the NGINX Ingress controller chart and their default values.

Parameter Description Default
controller.name The name of the Ingress controller daemonset or deployment. Autogenerated
controller.kind The kind of the Ingress controller installation - deployment or daemonset. deployment
controller.nginxplus Deploys the Ingress controller for NGINX Plus. false
controller.hostNetwork Enables the Ingress controller pods to use the host’s network namespace. false
controller.nginxDebug Enables debugging for NGINX. Uses the nginx-debug binary. Requires error-log-level: debug in the ConfigMap via controller.config.entries. false
controller.logLevel The log level of the Ingress Controller. 1
controller.image.repository The image repository of the Ingress controller. nginx/nginx-ingress
controller.image.tag The tag of the Ingress controller image. edge
controller.image.pullPolicy The pull policy for the Ingress controller image. IfNotPresent
controller.config.name The name of the ConfigMap used by the Ingress controller. Autogenerated
controller.config.entries The entries of the ConfigMap for customizing NGINX configuration. {}
controller.customPorts A list of custom ports to expose on the NGINX ingress controller pod. Follows the conventional Kubernetes yaml syntax for container ports. []
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.
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.
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
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
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
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
controller.nodeSelector The node selector for pod assignment for the Ingress controller pods. {}
controller.terminationGracePeriodSeconds The termination grace period of the Ingress controller pod. 30
controller.tolerations The tolerations of the Ingress controller pods. []
controller.affinity The affinity of the Ingress controller pods. {}
controller.volumes The volumes of the Ingress controller pods. []
controller.volumeMounts The volumeMounts of the Ingress controller pods. []
controller.resources The resources of the Ingress controller pods. {}
controller.replicaCount The number of replicas of the Ingress controller deployment. 1
controller.ingressClass A class of the Ingress controller. The Ingress controller only processes Ingress resources that belong to its class - i.e. have the annotation "kubernetes.io/ingress.class" equal to the class. Additionally, the Ingress controller processes Ingress resources that do not have that annotation which can be disabled by setting the “-use-ingress-class-only” flag. nginx
controller.useIngressClassOnly Ignore Ingress resources without the "kubernetes.io/ingress.class" annotation. false
controller.watchNamespace Namespace to watch for Ingress resources. By default the Ingress controller watches all namespaces. ””
controller.enableCustomResources Enable the custom resources. true
controller.enableTLSPassthrough Enable TLS Passthrough on port 443. Requires controller.enableCustomResources. false
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
controller.healthStatusURI Sets the URI of health status location in the default server. Requires contoller.healthStatus. ”/nginx-health”
controller.nginxStatus.enable Enable the NGINX stub_status, or the NGINX Plus API. true
controller.nginxStatus.port Set the port where the NGINX stub_status or the NGINX Plus API is exposed. 8080
controller.nginxStatus.allowCidrs Whitelist IPv4 IP/CIDR blocks to allow access to NGINX stub_status or the NGINX Plus API. Separate multiple IP/CIDR by commas. 127.0.0.1
controller.priorityClassName The PriorityClass of the Ingress controller pods. None
controller.service.create Creates a service to expose the Ingress controller pods. true
controller.service.type The type of service to create for the Ingress controller. LoadBalancer
controller.service.externalTrafficPolicy The externalTrafficPolicy of the service. The value Local preserves the client source IP. Local
controller.service.annotations The annotations of the Ingress controller service. {}
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. ””
controller.service.externalIPs The list of external IPs for the Ingress controller service. []
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. []
controller.service.name The name of the service. Autogenerated
controller.service.customPorts A list of custom ports to expose through the Ingress controller service. Follows the conventional Kubernetes yaml syntax for service ports. []
controller.service.httpPort.enable Enables the HTTP port for the Ingress controller service. true
controller.service.httpPort.port The HTTP port of the Ingress controller service. 80
controller.service.httpPort.nodePort The custom NodePort for the HTTP port. Requires controller.service.type set to NodePort. ””
controller.service.httpPort.targetPort The target port of the HTTP port of the Ingress controller service. 80
controller.service.httpsPort.enable Enables the HTTPS port for the Ingress controller service. true
controller.service.httpsPort.port The HTTPS port of the Ingress controller service. 443
controller.service.httpsPort.nodePort The custom NodePort for the HTTPS port. Requires controller.service.type set to NodePort. ””
controller.service.httpsPort.targetPort The target port of the HTTPS port of the Ingress controller service. 443
controller.serviceAccount.name The name of the service account of the Ingress controller pods. Used for RBAC. Autogenerated
controller.serviceAccount.imagePullSecrets The names of the secrets containing docker registry credentials. []
controller.reportIngressStatus.enable Update the address field in the status of Ingresses 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 or the external-status-address entry in the ConfigMap via controller.config.entries. Note: controller.config.entries.external-status-address takes precedence if both are set. true
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 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
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
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
controller.pod.annotations The annotations of the Ingress Controller pod. {}
rbac.create Configures RBAC. true
prometheus.create Expose NGINX or NGINX Plus metrics in the Prometheus format. false
prometheus.port Configures the port to scrape the metrics. 9113

Example:

$ cd kubernetes-ingress/helm-chart
$ helm install my-release . --set controller.replicaCount=5

Notes

  • The values-icp.yaml file is used for deploying the Ingress controller on IBM Cloud Private. See the blog post for more details.