nginx

by KubeGems

Helm chartv9.3.4App 1.21.0

Chart for the nginx server

About this chart

NGINX

NGINX (pronounced "engine-x") is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server).

TL;DR

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/nginx

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 NGINX Open Source 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. This Helm chart has been tested on top of Bitnami Kubernetes Production Runtime (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.

Prerequisites

  • Kubernetes 1.12+
  • Helm 3.1.0

Installing the Chart

To install the chart with the release name my-release:

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/nginx

These commands deploy NGINX Open Source on the Kubernetes cluster in the default configuration.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

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

Parameters

The following tables lists the configurable parameters of the NGINX chart and their default values per section/component:

Global parameters

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)

Common parameters

ParameterDescriptionDefault
nameOverrideString to partially override nginx.fullnamenil
fullnameOverrideString to fully override nginx.fullnamenil
clusterDomainDefault Kubernetes cluster domaincluster.local
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
extraDeployArray of extra objects to deploy with the release[] (evaluated as a template)
pdb.createCreated a PodDisruptionBudgetfalse
pdb.minAvailableSet PDB minAvailable value1
pdb.maxUnavailableSet PDB maxUnavailable valuenil
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)nil

NGINX parameters

ParameterDescriptionDefault
image.registryNGINX image registrydocker.io
image.repositoryNGINX image namebitnami/nginx
image.tagNGINX image tag{TAG_NAME}
image.pullPolicyNGINX image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
image.debugSet to true if you would like to see extra information on logsfalse
hostAliasesAdd deployment host aliases[]
commandOverride default container command (useful when using custom images)nil
argsOverride default container args (useful when using custom images)nil
extraEnvVarsExtra environment variables to be set on NGINX containers[]
extraEnvVarsCMName of existing ConfigMap containing extra env varsnil
extraEnvVarsSecretName of existing Secret containing extra env varsnil

NGINX deployment parameters

ParameterDescriptionDefault
replicaCountNumber of NGINX replicas to deploy1
strategyTypeDeployment Strategy TypeRollingUpdate
podAffinityPresetPod affinity preset. Ignored if affinity is set. Allowed values: soft or hard""
podAntiAffinityPresetPod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hardsoft
nodeAffinityPreset.typeNode affinity preset type. Ignored if affinity is set. Allowed values: soft or hard""
nodeAffinityPreset.keyNode label key to match Ignored if affinity is set.""
nodeAffinityPreset.valuesNode label values to match. Ignored if affinity is set.[]
affinityAffinity for pod assignment{} (evaluated as a template)
nodeSelectorNode labels for pod assignment{} (evaluated as a template)
tolerationsTolerations for pod assignment[] (evaluated as a template)
priorityClassNamePriority class name for pod""
podLabelsAdditional labels for NGINX pods{} (evaluated as a template)
podAnnotationsAnnotations for NGINX pods{} (evaluated as a template)
podSecurityContextNGINX pods' Security ContextCheck values.yaml file
containerSecurityContextNGINX containers' Security ContextCheck values.yaml file
containerPorts.httpSets http port inside NGINX container8080
containerPorts.httpsSets https port inside NGINX containernil
resources.limitsThe resources limits for the NGINX container{}
resources.requestsThe requested resources for the NGINX container{}
livenessProbeLiveness probe configuration for NGINXCheck values.yaml file
readinessProbeReadiness probe configuration for NGINXCheck values.yaml file
customLivenessProbeOverride default liveness probenil
customReadinessProbeOverride default readiness probenil
autoscaling.enabledEnable autoscaling for NGINX deploymentfalse
autoscaling.minReplicasMinimum number of replicas to scale backnil
autoscaling.maxReplicasMaximum number of replicas to scale outnil
autoscaling.targetCPUTarget CPU utilization percentagenil
autoscaling.targetMemoryTarget Memory utilization percentagenil
extraVolumesArray to add extra volumes[] (evaluated as a template)
extraVolumeMountsArray to add extra mount[] (evaluated as a template)
sidecarsAttach additional containers to nginx podsnil
initContainersAdditional init containers (this value is evaluated as a template)[]
serviceAccount.createEnable creation of ServiceAccount for nginx podfalse
serviceAccount.nameThe name of the service account to use. If not set and create is true, a name is generatedGenerated using the common.names.fullname template
serviceAccount.annotationsAnnotations for service account.{}

Custom NGINX application parameters

ParameterDescriptionDefault
cloneStaticSiteFromGit.enabledGet the server static content from a GIT repositoryfalse
cloneStaticSiteFromGit.image.registryGIT image registrydocker.io
cloneStaticSiteFromGit.image.repositoryGIT image namebitnami/git
cloneStaticSiteFromGit.image.tagGIT image tag

Deploy nginx with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nginx on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnginx is pinned at v9.3.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply