bitnamicharts/nginx-ingress-controller
Bitnami Helm chart for NGINX Ingress Controller
1M+
NGINX Ingress Controller is an Ingress controller that manages external access to HTTP services in a Kubernetes cluster using NGINX.
Overview of NGINX Ingress Controller
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
helm install my-release oci://registry-1.docker.io/bitnamicharts/nginx-ingress-controller
Looking to use NGINX Ingress Controller in production? Try VMware Tanzu Application Catalog, the commercial edition of the Bitnami catalog.
Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.
This chart bootstraps a ingress-nginx deployment on a Kubernetes cluster using the Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.
To install the chart with the release name my-release
:
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/nginx-ingress-controller
Note: You need to substitute the placeholders
REGISTRY_NAME
andREPOSITORY_NAME
with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.io
andREPOSITORY_NAME=bitnamicharts
.
These commands deploy nginx-ingress-controller on the Kubernetes cluster in the default configuration.
Tip: List all releases using
helm list
Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the resources
value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
To make this process easier, the chart contains the resourcesPreset
values, which automatically sets the resources
section according to different presets. Check these presets in the bitnami/common chart. However, in production workloads using resourcesPreset
is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the official Kubernetes documentation.
This chart can be integrated with Prometheus by setting metrics.enabled
to true
. This will expose nginx-ingress-controller native Prometheus endpoint and a metrics
service that can be configured using the metrics.service
section. It will be have the necessary annotations to be automatically scraped by Prometheus.
Prometheus requirements
It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the Bitnami Prometheus helm chart or the Bitnami Kube Prometheus helm chart to easily have a working Prometheus in your cluster.
Integration with Prometheus Operator
The chart can deploy ServiceMonitor
objects for integration with Prometheus Operator installations. To do so, set the value metrics.serviceMonitor.enabled=true
. Ensure that the Prometheus Operator CustomResourceDefinitions
are installed in the cluster or it will fail with the following error:
no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
Install the Bitnami Kube Prometheus helm chart for having the necessary CRDs and the Prometheus Operator.
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using Velero, a Kubernetes backup/restore tool. Find the instructions for using Velero in this guide.
If you have a need for additional containers to run within the same pod as the NGINX Ingress Controller (e.g. an additional metrics or logging exporter), you can do so via the sidecars
config parameter. Simply define your container according to the Kubernetes container spec.
sidecars:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
Similarly, you can add extra init containers using the initContainers
parameter.
initContainers:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
There are cases where you may want to deploy extra objects, such a ConfigMap containing your app's configuration or some extra deployment with a micro service used by your app. For covering this case, the chart allows adding the full specification of other objects using the extraDeploy
parameter.
This chart allows you to set your custom affinity using the affinity
parameter. Find more information about Pod's affinity in the kubernetes documentation.
As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the bitnami/common chart. To do so, set the podAffinityPreset
, podAntiAffinityPreset
, or nodeAffinityPreset
parameters.
Name | Description | Value |
---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.security.allowInsecureImages | Allows skipping image verification | false |
global.compatibility.openshift.adaptSecurityContext | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | auto |
Name | Description | Value |
---|---|---|
kubeVersion | Force target Kubernetes version (using Helm capabilities if not set) | "" |
nameOverride | String to partially override common.names.fullname | "" |
fullnameOverride | String to fully override common.names.fullname | "" |
namespaceOverride | String to fully override common.names.namespace | "" |
commonLabels | Add labels to all the deployed resources | {} |
commonAnnotations | Add annotations to all the deployed resources | {} |
extraDeploy | Array of extra objects to deploy with the release | [] |
clusterDomain | Kubernetes cluster domain name | cluster.local |
Name | Description | Value |
---|---|---|
image.registry | Nginx Ingress Controller image registry | REGISTRY_NAME |
image.repository | Nginx Ingress Controller image repository | REPOSITORY_NAME/nginx-ingress-controller |
image.digest | Nginx Ingress Controller image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | "" |
image.pullPolicy | Nginx Ingress Controller image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] |
containerPorts.http | Nginx Ingress Controller HTTP port | 8080 |
containerPorts.https | Nginx Ingress Controller HTTPS port | 8443 |
containerPorts.defaultServer | Nginx Ingress Controller default server port | 8181 |
containerPorts.metrics | Nginx Ingress Controller metrics port | 10254 |
containerPorts.profiler | Nginx Ingress Controller profiler port | 10245 |
containerPorts.status | Nginx Ingress Controller status port | 10246 |
containerPorts.stream | Nginx Ingress Controller stream port | 10247 |
automountServiceAccountToken | Mount Service Account token in pod | true |
hostAliases | Deployment pod host aliases | [] |
config | Custom configuration options for NGINX | {} |
proxySetHeaders | Custom headers before sending traffic to backends | {} |
addHeaders | Custom headers before sending response traffic to the client | {} |
defaultBackendService | Default 404 backend service; required only if defaultBackend.enabled = false | "" |
electionID | Election ID to use for status update | ingress-controller-leader |
allowSnippetAnnotations | Allow users to set snippet annotations | false |
reportNodeInternalIp | If using hostNetwork=true , setting reportNodeInternalIp=true , will pass the flag report-node-internal-ip-address to Nginx Ingress Controller | false |
watchIngressWithoutClass | Process Ingress objects without ingressClass annotation/ingressClassName field | false |
ingressClassResource.name | Name of the IngressClass resource | nginx |
ingressClassResource.enabled | Create the IngressClass resource | true |
ingressClassResource.default | Set the created IngressClass resource as default class | false |
ingressClassResource.controllerClass | IngressClass identifier for the controller | k8s.io/ingress-nginx |
ingressClassResource.parameters | Optional parameters for the controller | {} |
publishService.enabled | Set the endpoint records on the Ingress objects to reflect those on the service | false |
publishService.pathOverride | Allows overriding of the publish service to bind to | "" |
scope.enabled | Limit the scope of the controller. | false |
scope.namespace | Scope namespace. Defaults to .Release.Namespace | "" |
configMapNamespace | Allows customization of the configmap / nginx-configmap namespace | "" |
tcpConfigMapNamespace | Allows customization of the tcp-services-configmap namespace | "" |
udpConfigMapNamespace | Allows customization of the udp-services-configmap namespace | "" |
maxmindLicenseKey | License key used to download Geolite2 database | "" |
dhParam | A base64ed Diffie-Hellman parameter | "" |
tcp | TCP service key:value pairs | {} |
udp | UDP service key:value pairs | {} |
svcPortNamesPrefix | Prefix for TCP and UDP ports names in ingress controller service | "" |
command | Override default container command (useful when using custom images) | [] |
args | Override default container args (useful when using custom images) | [] |
lifecycleHooks | for the %%MAIN_CONTAINER_NAME%% container(s) to automate configuration before or after startup | {} |
extraArgs | Additional command line arguments to pass to nginx-ingress-controller | {} |
extraEnvVars | Extra environment variables to be set on Nginx Ingress container | [] |
extraEnvVarsCM | Name of a existing ConfigMap containing extra environment variables | "" |
extraEnvVarsSecret | Name of a existing Secret containing extra environment variables | "" |
Name | Description | Value |
---|---|---|
kind | Install as Deployment or DaemonSet | Deployment |
daemonset.useHostPort | If kind is DaemonSet , this will enable hostPort for TCP/80 and TCP/443 | false |
daemonset.hostPorts | HTTP and HTTPS ports | {} |
replicaCount | Desired number of Controller pods | 1 |
updateStrategy | Strategy to use to update Pods | {} |
revisionHistoryLimit | The number of old history to retain to allow rollback | 10 |
podSecurityContext.enabled | Enable Controller pods' Security Context |
Note: the README for this chart is longer than the DockerHub length limit of 25000, so it has been trimmed. The full README can be found at https://github.com/bitnami/charts/blob/main/bitnami/nginx-ingress-controller/README.md