Introducing our new CEO Don Johnson - Read More

bitnamicharts/nginx-ingress-controller

Verified Publisher

By VMware

Updated 9 days ago

Bitnami Helm chart for NGINX Ingress Controller

Helm
Image
Networking
Security
Web Servers
0

1M+

Bitnami package for NGINX Ingress Controller

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.

TL;DR

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.

Introduction

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.

Prerequisites

  • Kubernetes 1.23+
  • Helm 3.8.0+

Installing the Chart

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 and REPOSITORY_NAME with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use REGISTRY_NAME=registry-1.docker.io and REPOSITORY_NAME=bitnamicharts.

These commands deploy nginx-ingress-controller on the Kubernetes cluster in the default configuration.

Tip: List all releases using helm list

Configuration and installation details

Resource requests and limits

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.

Prometheus metrics

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.

Rolling VS Immutable tags

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.

Backup and restore

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.

Sidecars and Init Containers

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
Deploying extra resources

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.

Setting Pod's affinity

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.

Parameters

Global parameters
NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.security.allowInsecureImagesAllows skipping image verificationfalse
global.compatibility.openshift.adaptSecurityContextAdapt 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
Common parameters
NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override common.names.fullname""
fullnameOverrideString to fully override common.names.fullname""
namespaceOverrideString to fully override common.names.namespace""
commonLabelsAdd labels to all the deployed resources{}
commonAnnotationsAdd annotations to all the deployed resources{}
extraDeployArray of extra objects to deploy with the release[]
clusterDomainKubernetes cluster domain namecluster.local
Nginx Ingress Controller parameters
NameDescriptionValue
image.registryNginx Ingress Controller image registryREGISTRY_NAME
image.repositoryNginx Ingress Controller image repositoryREPOSITORY_NAME/nginx-ingress-controller
image.digestNginx Ingress Controller image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyNginx Ingress Controller image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
containerPorts.httpNginx Ingress Controller HTTP port8080
containerPorts.httpsNginx Ingress Controller HTTPS port8443
containerPorts.defaultServerNginx Ingress Controller default server port8181
containerPorts.metricsNginx Ingress Controller metrics port10254
containerPorts.profilerNginx Ingress Controller profiler port10245
containerPorts.statusNginx Ingress Controller status port10246
containerPorts.streamNginx Ingress Controller stream port10247
automountServiceAccountTokenMount Service Account token in podtrue
hostAliasesDeployment pod host aliases[]
configCustom configuration options for NGINX{}
proxySetHeadersCustom headers before sending traffic to backends{}
addHeadersCustom headers before sending response traffic to the client{}
defaultBackendServiceDefault 404 backend service; required only if defaultBackend.enabled = false""
electionIDElection ID to use for status updateingress-controller-leader
allowSnippetAnnotationsAllow users to set snippet annotationsfalse
reportNodeInternalIpIf using hostNetwork=true, setting reportNodeInternalIp=true, will pass the flag report-node-internal-ip-address to Nginx Ingress Controllerfalse
watchIngressWithoutClassProcess Ingress objects without ingressClass annotation/ingressClassName fieldfalse
ingressClassResource.nameName of the IngressClass resourcenginx
ingressClassResource.enabledCreate the IngressClass resourcetrue
ingressClassResource.defaultSet the created IngressClass resource as default classfalse
ingressClassResource.controllerClassIngressClass identifier for the controllerk8s.io/ingress-nginx
ingressClassResource.parametersOptional parameters for the controller{}
publishService.enabledSet the endpoint records on the Ingress objects to reflect those on the servicefalse
publishService.pathOverrideAllows overriding of the publish service to bind to""
scope.enabledLimit the scope of the controller.false
scope.namespaceScope namespace. Defaults to .Release.Namespace""
configMapNamespaceAllows customization of the configmap / nginx-configmap namespace""
tcpConfigMapNamespaceAllows customization of the tcp-services-configmap namespace""
udpConfigMapNamespaceAllows customization of the udp-services-configmap namespace""
maxmindLicenseKeyLicense key used to download Geolite2 database""
dhParamA base64ed Diffie-Hellman parameter""
tcpTCP service key:value pairs{}
udpUDP service key:value pairs{}
svcPortNamesPrefixPrefix for TCP and UDP ports names in ingress controller service""
commandOverride default container command (useful when using custom images)[]
argsOverride default container args (useful when using custom images)[]
lifecycleHooksfor the %%MAIN_CONTAINER_NAME%% container(s) to automate configuration before or after startup{}
extraArgsAdditional command line arguments to pass to nginx-ingress-controller{}
extraEnvVarsExtra environment variables to be set on Nginx Ingress container[]
extraEnvVarsCMName of a existing ConfigMap containing extra environment variables""
extraEnvVarsSecretName of a existing Secret containing extra environment variables""
Nginx Ingress deployment / daemonset parameters
NameDescriptionValue
kindInstall as Deployment or DaemonSetDeployment
daemonset.useHostPortIf kind is DaemonSet, this will enable hostPort for TCP/80 and TCP/443false
daemonset.hostPortsHTTP and HTTPS ports{}
replicaCountDesired number of Controller pods1
updateStrategyStrategy to use to update Pods{}
revisionHistoryLimitThe number of old history to retain to allow rollback10
podSecurityContext.enabledEnable 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

Docker Pull Command

docker pull bitnamicharts/nginx-ingress-controller
Bitnami