轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页
个人中心
拉取日志
交易
充值流量¥8起
我的订单
文档
工具
提交工单
页面收录
nginx

bitnamicharts/nginx

bitnamicharts

Bitnami提供的Helm图表,用于在Kubernetes环境中部署和管理NGINX Open Source开源Web服务器及反向代理。

4 次收藏下载次数: 0状态:社区镜像维护者:bitnamicharts仓库类型:镜像最近更新:2 天前
DockerHub 官方简介
轩辕镜像中文简介
下载命令
镜像标签列表与下载命令
轩辕镜像,让镜像更快,让人生更轻。
点击查看

Bitnami Secure Images Helm chart for NGINX Open Source

NGINX Open Source is a web server that can be also used as a reverse proxy, load ***, and HTTP cache. Recommended for high-demanding sites due to its ability to provide faster content.

http://nginx.org

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

console
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/nginx

Note: You need to substitute the placeholders REGISTRY_NAME and REPOSITORY_NAME with a reference to your Helm chart registry and repository.

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 https://github.com/bitnami/containers/tree/main/bitnami/nginx deployment on a https://kubernetes.io cluster using the https://helm.sh package manager.

Before you begin

  • Kubernetes 1.23+
  • Helm 3.8.0+

Installing the Chart

First, log in to the OCI registry and create a secret with your registry credentials:

console
helm registry login REGISTRY_NAME
kubectl create secret docker-registry SECRET_NAME -n NAMESPACE \
  --docker-server REGISTRY_NAME \
  --docker-username "USER" \
  --docker-password "TOKEN"

Note Replace the placeholders in these commands (REGISTRY_NAME, SECRET_NAME, NAMESPACE, USER, and TOKEN) with your actual values.

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

console
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/nginx --set "global.imagePullSecrets[0]=SECRET_NAME" -n NAMESPACE

Note Replace the placeholders in the helm install command (REGISTRY_NAME, REPOSITORY_NAME, SECRET_NAME, and NAMESPACE) with your actual values.

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

Tip: List all releases using helm list

Configuration and installation details

This section describes credentials, configuration, and other installation options.

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 https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15. 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 https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/.

Prometheus metrics

This chart can be integrated with Prometheus by setting metrics.enabled to true. This will deploy a sidecar container with https://github.com/nginxinc/nginx-prometheus-exporter in all pods and will expose it via the NGINX service. This service 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 https://github.com/bitnami/charts/tree/main/bitnami/prometheus or the https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus 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:

text
no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"

Install the https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus for having the necessary CRDs and the Prometheus Operator.

Securing traffic using TLS

NGINX can encrypt communications by setting tls.enabled=true. The chart allows two configuration options:

  • Provide your own secret using the tls.certificatesSecret value. Also set the correct name of the certificate files using the tls.certFilename, tls.certKeyFilename and tls.certCAFilename values.
  • Have the chart auto-generate the certificates using tls.autoGenerated=true.

https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-doc/apps-tutorials-understand-rolling-tags-containers-index.html

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.

Use a different NGINX version

To modify the application version used in this chart, specify a different version of the image using the image.tag parameter and/or a different repository using the image.repository parameter.

FIPS parameters

The FIPS parameters only have effect if you are using images from the https://go-vmware.broadcom.com/contact-us.

For more information on this new support, please refer to the https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-doc/security-frameworks-FIPS-compliance.html.

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 https://velero.io/, a Kubernetes backup/restore tool. Find the instructions for using Velero in https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-doc/apps-tutorials-backup-restore-deployments-velero-index.html.

Deploying your custom web application

The NGINX chart allows you to deploy a custom web application using one of the following methods:

  • Cloning from a git repository: Set cloneStaticSiteFromGit.enabled to true and set the repository and branch using the cloneStaticSiteFromGit.repository and cloneStaticSiteFromGit.branch parameters. A sidecar will also pull the latest changes in an interval set by cloneStaticSitesFromGit.interval.
  • Providing a ConfigMap: Set the staticSiteConfigmap value to mount a ConfigMap in the NGINX html folder.
  • Using an existing PVC: Set the staticSitePVC value to mount an PersistentVolumeClaim with the static site content.

You can deploy a example web application using git deploying the chart with the following parameters:

console
cloneStaticSiteFromGit.enabled=true
cloneStaticSiteFromGit.repository=https://github.com/mdn/beginner-html-site-styled.git
cloneStaticSiteFromGit.branch=master

Providing a custom server block

This helm chart supports using custom custom server block for NGINX to use.

You can use the serverBlock or streamServerBlock value to provide a custom server block for NGINX to use. To do this, create a values files with your server block and install the chart using it:

yaml
serverBlock: |-
  server {
    listen 0.0.0.0:8080;
    location / {
      return 200 "hello!";
    }
  }

Warning: The above example is not compatible with enabling Prometheus metrics since it affects the /status endpoint.

In addition, you can also set an external ConfigMap with the configuration file. This is done by setting the existingServerBlockConfigmap parameter. Note that this will override the previous option.

Adding custom configuration by context

The NGINX chart supports context-based configuration includes, allowing you to add custom directives to specific NGINX contexts. You can provide configuration for three contexts:

  • Main context: For global directives like module loading and worker processes
  • Events context: For event-related directives
  • HTTP context: For HTTP-related directives

Inline Context Configuration

You can provide inline configuration using the contextIncludes values:

yaml
contextIncludes:
  main: |
    # Load additional modules
    load_module /opt/bitnami/nginx/modules/ngx_http_dav_module.so;

    # Set worker processes
    worker_processes auto;

  events: |
    # Increase worker connections
    worker_connections 2048;

    # Use epoll for better performance
    use epoll;

  http: |
    # Enable gzip compression
    gzip on;
    gzip_vary on;
    gzip_types text/plain application/json text/css;

    # Security headers
    add_header X-Frame-Options DENY;
    add_header X-Content-Type-Options nosniff;

External ConfigMaps for Context Configuration

You can also reference external ConfigMaps for each context using lists:

yaml
existingContextMainConfigmaps:
  - "nginx-modules-config"
  - "nginx-main-directives"

existingContextEventsConfigmaps:
  - "nginx-events-tuning"

existingContextHttpConfigmaps:
  - "nginx-security-headers"
  - "nginx-compression-config"

Mixed Configuration

You can combine inline configuration with external ConfigMaps:

yaml
contextIncludes:
  main: |
    worker_processes auto;

existingContextMainConfigmaps:
  - "nginx-modules-config"

existingContextHttpConfigmaps:
  - "nginx-security-config"

All configuration files are mounted to the appropriate directories (/opt/bitnami/nginx/conf/context.d/{main,events,http}/) and included using wildcards in the nginx.conf.

Adding extra environment variables

In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the extraEnvVars property.

yaml
extraEnvVars:
  - name: LOG_LEVEL
    value: error

Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the extraEnvVarsCM or the extraEnvVarsSecret values.

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 https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity.

As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the https://github.com/bitnami/charts/tree/main/bitnami/common#affinity chart. To do so, set the podAffinityPreset, podAntiAffinityPreset, or nodeAffinityPreset parameters.

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.

Gateway API

This chart provides support for exposing NGINX using the https://gateway-api.sigs.k8s.io/ and its HTTPRoute resource. If you have a Gateway controller installed on your cluster, such as APISIX, Contour, Envoy Gateway, NGINX Gateway Fabric or Kong Ingress Controller you can utilize the Gateway controller to serve your application. To enable Gateway API integration, set httpRoute.enabled to true. The Gateway to be used can be customized by setting the httpRoute.parentRefs parameter. By default, it will reference a Gateway named gateway in the same namespace as the release.

You can specify the list of hostnames to be mapped to the deployment using the httpRoute.hostnames parameter. Additionally, you can customize the rules used to route the traffic to the service by modifying the httpRoute.matches and httpRoute.filters parameters or adding new rules using the httpRoute.extraRules parameter.

This chart also supports creating a BackendTLSPolicy to define the SNI the Gateway should use to connect to the NGINX backend pods and how the certificate served by these pods should be verified. To do so, set the backendTLSPolicy.enabled parameter to true. Please note it's required to secure traffic using TLS as explained in the Securing traffic using TLS section to be able to use this feature.

Ingress

This chart provides support for ingress resources. If you have an ingress controller installed on your cluster, such as https://github.com/bitnami/charts/tree/main/bitnami/nginx-ingress-controller or https://github.com/bitnami/charts/tree/main/bitnami/contour you can utilize the ingress controller to serve your application.

To enable ingress integration, please set ingress.enabled to true.

Hosts

Most likely you will only want to have one hostname that maps to this NGINX installation. If that's your case, the property ingress.hostname will set it. However, it is possible to have more than one host. To facilitate this, the ingress.extraHosts object can be specified as an array. You can also use ingress.extraTLS to add the TLS configuration for extra hosts.

For each host indicated at ingress.extraHosts, please indicate a name, path, and any annotations that you may want the ingress controller to know about.

For annotations, please see https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md. Not all annotations are supported by all ingress controllers, but this document does a good job of indicating which annotation is supported by many popular ingress controllers.

Parameters

The following subsections list global, common, and component-specific parameters.

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.defaultFipsDefault value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overridden by the 'fips' objectrestricted
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
global.clusterDomainKubernetes cluster domaincluster.local

Common parameters

NameDescriptionValue
nameOverrideString to partially override nginx.fullname template (will maintain the release name)""
fullnameOverrideString to fully override nginx.fullname template""
namespaceOverrideString to fully override common.names.namespace""
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
clusterDomainKubernetes Cluster Domaincluster.local
extraDeployExtra objects to deploy (value evaluated as a template)[]
commonLabelsAdd labels to all the deployed resources{}
commonAnnotationsAdd annotations to all the deployed resources{}
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the the deployment(s)/statefulset(s)["sleep"]
diagnosticMode.argsArgs to override all containers in the the deployment(s)/statefulset(s)["infinity"]

NGINX parameters

NameDescriptionValue
image.registryNGINX image registryREGISTRY_NAME
image.repositoryNGINX image repositoryREPOSITORY_NAME/nginx
image.digestNGINX image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyNGINX image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
image.debugSet to true if you would like to see extra information on logsfalse
enableDefaultInitContainersIf set to false, disable all init containers except user-defined at initContainer.true
automountServiceAccountTokenMount Service Account token in podfalse
hostAliasesDeployment pod host aliases[]
commandOverride default container command (useful when using custom images)[]
argsOverride default container args (useful when using custom images)[]
extraEnvVarsExtra environment variables to be set on NGINX containers[]
extraEnvVarsCMConfigMap with extra environment variables""
extraEnvVarsSecretSecret with extra environment variables""

NGINX deployment parameters

NameDescriptionValue
replicaCountNumber of NGINX replicas to deploy1
revisionHistoryLimitThe number of old history to retain to allow rollback10
updateStrategy.typeNGINX deploy

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://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-app-doc/apps-charts-nginx-index.html

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 nginx 镜像标签

docker pull docker.xuanyuan.run/bitnamicharts/nginx:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull bitnamicharts/nginx:<标签>

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

查看流量套餐与价格
用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

镜像详情/bitnamicharts/nginx
充值充值流量套餐
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥8/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱

更多 nginx 镜像推荐

nginx logo

library/nginx

Docker 官方镜像
官方
Nginx 官方 Docker 镜像,提供高性能 Web 服务器和反向代理能力,适合部署静态站点、反向代理和负载均衡入口,可通过挂载配置和静态目录快速搭建统一的 Web 与 API 网关层。
2.1万 次收藏10亿+ 次下载
4 小时前更新
nginx logo

youstin/nginx

youstin
暂无描述
5亿+ 次下载
2 年前更新
nginx logo

bitnami/nginx

Bitnami Secure Images(VMware Tanzu)
Bitnami Nginx安全镜像是由Bitnami提供的预配置、安全加固且高度优化的软件包,专为快速部署稳定可靠的Nginx Web服务器环境而设计,集成了自动安全更新、漏洞修复机制及合规性支持,可有效简化服务器配置流程,保障Web应用在生产环境中的安全性与高性能,适用于各类Web服务场景如静态资源托管、反向代理及负载均衡等。
206 次收藏1亿+ 次下载
2 天前更新
nginx logo

starojanje/nginx

starojanje
暂无描述
1亿+ 次下载
2 年前更新
nginx logo

linuxserver/nginx

LinuxServer.io 社区镜像
LinuxServer.io提供的Nginx容器,用于部署Web服务器、实现反向代理及HTTP缓存等基础Web服务。
236 次收藏5000万+ 次下载
1 天前更新
nginx logo

ubuntu/nginx

Ubuntu 官方镜像
Nginx是一款高性能的反向代理和Web服务器,以高并发处理能力、低资源消耗及出色的稳定性著称,广泛应用于各类网站架构中,承担请求转发、负载均衡、静态资源服务等关键任务,其长期跟踪版本由Canonical公司负责维护,为用户提供持续可靠的技术支持与版本更新。
143 次收藏1000万+ 次下载
2 个月前更新

查看更多 nginx 相关镜像

更多相关 Docker 镜像与资源

以下是 bitnamicharts/nginx 相关的常用 Docker 镜像,适用于 反向代理、负载均衡、静态资源服务 等不同场景:

  • library/nginx Docker 镜像说明
  • ilios/nginx Docker 镜像说明(Nginx Web 服务器,轻量高效)
  • ubuntu/nginx Docker 镜像说明(Nginx Web 服务器,基于 Ubuntu,适合生产环境)
  • bitnami/nginx Docker 镜像说明(Nginx Web 服务器,Bitnami 企业级配置,适合生产环境)
  • linuxserver/nginx Docker 镜像说明(Nginx Web 服务器,LinuxServer 维护版本,适合静态资源服务和反向代理)