Tanzu Application Catalog services

Bitnami package for NATS

Last Updated March 07, 2025

NATS is an open source, lightweight and high-performance messaging system. It is ideal for distributed systems and supports modern cloud architectures and pub-sub, request-reply and queuing models.

Overview of NATS

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_NAME/REPOSITORY_NAME/nats

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

Introduction

This chart bootstraps a NATS 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/nats

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.

The command deploys NATS on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

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.

Update credentials

The Bitnami NATS chart, when upgrading, reuses the secret previously rendered by the chart or the one specified in existingSecret. To update credentials, use one of the following:

  • Run helm upgrade specifying new credentials via auth.token or auth.credentials parameters
  • Run helm upgrade specifying a new secret in existingSecret

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.

Prometheus metrics

This chart can be integrated with Prometheus by setting metrics.enabled to true. This will deploy a sidecar container with prometheus-nats-exporter in all pods and a metrics service, which can be configured under the metrics.service section. This metrics service will 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.

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

extraEnvVars:
  - name: LOG_LEVEL
    value: DEBUG

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

Use Sidecars and Init Containers

If additional containers are needed in the same pod (such as additional metrics or logging exporters), they can be defined using the sidecars config parameter.

sidecars:
- name: your-image-name
  image: your-image
  imagePullPolicy: Always
  ports:
  - name: portname
    containerPort: 1234

If these sidecars export extra ports, extra port definitions can be added using the service.extraPorts parameter (where available), as shown in the example below:

service:
  extraPorts:
  - name: extraPort
    port: 11311
    targetPort: 11311

NOTE: This Helm chart already includes sidecar containers for the Prometheus exporters (where applicable). These can be activated by adding the --enable-metrics=true parameter at deployment time. The sidecars parameter should therefore only be used for any extra sidecar containers.

If additional init containers are needed in the same pod, they can be defined using the initContainers parameter. Here is an example:

initContainers:
  - name: your-image-name
    image: your-image
    imagePullPolicy: Always
    ports:
      - name: portname
        containerPort: 1234

Learn more about sidecar containers and init containers.

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

Set Pod affinity

This chart allows you to set custom Pod affinity using the affinity parameter. Find more information about Pod 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.defaultStorageClassGlobal default StorageClass for Persistent Volume(s)""
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
kubeVersionOverride Kubernetes version""
nameOverrideString to partially override common.names.name""
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{}
clusterDomainKubernetes Cluster Domaincluster.local
extraDeployArray of extra objects to deploy with the release[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the deployment["sleep"]
diagnosticMode.argsArgs to override all containers in the deployment["infinity"]

NATS parameters

NameDescriptionValue
image.registryNATS image registryREGISTRY_NAME
image.repositoryNATS image repositoryREPOSITORY_NAME/nats
image.digestNATS image digest in the way sha256:aa…. Please note this parameter, if set, will override the tag""
image.pullPolicyNATS image pull policyIfNotPresent
image.pullSecretsNATS image pull secrets[]
auth.enabledSwitch to enable/disable client authenticationtrue
auth.tokenClient authentication token""
auth.credentialsClient authentication users credentials collection. Ignored if auth.token is set[]
auth.noAuthUserNo authenticated access will be associated with this user. It must be one of the available under auth.credentials map array. No authenticated access will be denied if unset.""
auth.timeoutClient authentication timeout (seconds)1
tls.enabledEnable TLS configuration for NATSfalse
tls.autoGenerated.enabledEnable automatic generation of TLS certificatestrue
tls.autoGenerated.engineMechanism to generate the certificates (allowed values: helm, cert-manager)helm
tls.autoGenerated.certManager.existingIssuerThe name of an existing Issuer to use for generating the certificates (only for cert-manager engine)""
tls.autoGenerated.certManager.existingIssuerKindExisting Issuer kind, defaults to Issuer (only for cert-manager engine)""
tls.autoGenerated.certManager.keyAlgorithmKey algorithm for the certificates (only for cert-manager engine)RSA
tls.autoGenerated.certManager.keySizeKey size for the certificates (only for cert-manager engine)2048
tls.autoGenerated.certManager.durationDuration for the certificates (only for cert-manager engine)2160h
tls.autoGenerated.certManager.renewBeforeRenewal period for the certificates (only for cert-manager engine)360h
tls.caCA certificate for TLS. Ignored if tls.existingCASecret is set""
tls.existingCASecretThe name of an existing Secret containing the CA certificate for TLS""
tls.server.certTLS certificate for NATS servers. Ignored if tls.server.existingSecret is set""
tls.server.keyTLS key for NATS servers. Ignored if tls.server.existingSecret is set""
tls.server.existingSecretThe name of an existing Secret containing the TLS certificates for NATS servers""
tls.client.certTLS certificate for NATS clients. Ignored if tls.client.existingSecret is set""
tls.client.keyTLS key for NATS clients. Ignored if tls.client.existingSecret is set""
tls.client.existingSecretThe name of an existing Secret containing the TLS certificates for NATS clients""
cluster.nameCluster namenats
cluster.connectRetriesConfigure number of connect retries for implicit routes, otherwise leave blank""
cluster.auth.enabledSwitch to enable/disable cluster authenticationtrue
cluster.auth.userCluster authentication usernats_cluster
cluster.auth.passwordCluster authentication password""
jetstream.enabledSwitch to enable/disable JetStreamfalse
jetstream.maxMemoryMax memory usage for JetStream1G
debug.enabledSwitch to enable/disable debug on loggingfalse
debug.traceSwitch to enable/disable trace debug level on loggingfalse
debug.logtimeSwitch to enable/disable logtime on loggingfalse
maxConnectionsMax. number of client connections""
maxControlLineMax. protocol control line""
maxPayloadMax. payload""
writeDeadlineDuration the server can block on a socket write to a client""
natsFilenameFilename used by several NATS files (binary, configuration file, and pid file)nats-server
configurationSpecify content for NATS configuration file (generated based on other parameters otherwise)""
existingSecretName of an existing secret with your custom configuration for NATS""
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 NATS container[]
extraEnvVarsCMConfigMap with extra environment variables""
extraEnvVarsSecretSecret with extra environment variables""

NATS deployment/statefulset parameters

NameDescriptionValue
resourceTypeNATS cluster resource type under Kubernetes. Allowed values: statefulset (default) or deploymentstatefulset
replicaCountNumber of NATS nodes1
schedulerNameUse an alternate scheduler, e.g. “stork”.""
priorityClassNameName of pod priority class""
updateStrategy.typeNATS deployment/statefulset update strategy typeRollingUpdate
podManagementPolicyStatefulSet pod management policyOrderedReady
containerPorts.clientNATS client container port4222
containerPorts.clusterNATS cluster container port6222
containerPorts.monitoringNATS monitoring container port8222
podSecurityContext.enabledEnabled NATS pods’ Security Contexttrue
podSecurityContext.fsGroupChangePolicySet filesystem group change policyAlways
podSecurityContext.sysctlsSet kernel settings using the sysctl interface[]
podSecurityContext.supplementalGroupsSet filesystem extra groups[]
podSecurityContext.fsGroupSet NATS pod’s Security Context fsGroup1001
containerSecurityContext.enabledEnabled containers’ Security Contexttrue
containerSecurityContext.seLinuxOptionsSet SELinux options in container{}
containerSecurityContext.runAsUserSet containers’ Security Context runAsUser1001
containerSecurityContext.runAsGroupSet containers’ Security Context runAsGroup1001
containerSecurityContext.runAsNonRootSet container’s Security Context runAsNonRoottrue
containerSecurityContext.privilegedSet container’s Security Context privilegedfalse
containerSecurityContext.readOnlyRootFilesystemSet container’s Security Context readOnlyRootFilesystemtrue
containerSecurityContext.allowPrivilegeEscalationSet container’s Security Context allowPrivilegeEscalationfalse
containerSecurityContext.capabilities.dropList of capabilities to be dropped["ALL"]
containerSecurityContext.seccompProfile.typeSet container’s Security Context seccomp profileRuntimeDefault
resourcesPresetSet container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).nano
resourcesSet container requests and limits for different resources like CPU or memory (essential for production workloads){}
livenessProbe.enabledEnable livenessProbetrue
livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe30
livenessProbe.periodSecondsPeriod seconds for livenessProbe10
livenessProbe.timeoutSecondsTimeout seconds for livenessProbe5
livenessProbe.failureThresholdFailure threshold for livenessProbe6
livenessProbe.successThresholdSuccess threshold for livenessProbe1
readinessProbe.enabledEnable readinessProbetrue
readinessProbe.initialDelaySecondsInitial delay seconds for readinessProbe5
readinessProbe.periodSecondsPeriod seconds for readinessProbe10
readinessProbe.timeoutSecondsTimeout seconds for readinessProbe5
readinessProbe.failureThresholdFailure threshold for readinessProbe6
readinessProbe.successThresholdSuccess threshold for readinessProbe1
startupProbe.enabledEnable startupProbe on NATS containersfalse
startupProbe.initialDelaySecondsInitial delay seconds for startupProbe5
startupProbe.periodSecondsPeriod seconds for startupProbe10
startupProbe.timeoutSecondsTimeout seconds for startupProbe5
startupProbe.failureThresholdFailure threshold for startupProbe6
startupProbe.successThresholdSuccess threshold for startupProbe1
customLivenessProbeOverride default liveness probe{}
customReadinessProbeOverride default readiness probe{}
customStartupProbeCustom startupProbe that overrides the default one{}
automountServiceAccountTokenMount Service Account token in podfalse
hostAliasesDeployment pod host aliases[]
podLabelsExtra labels for NATS pods{}
podAnnotationsAnnotations for NATS pods{}
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.[]
topologySpreadConstraintsTopology Spread Constraints for NATS pods assignment spread across your cluster among failure-domains[]
lifecycleHooksfor the NATS container(s) to automate configuration before or after startup{}
extraVolumesOptionally specify extra list of additional volumes for NATS pods[]
extraVolumeMountsOptionally specify extra list of additional volumeMounts for NATS container(s)[]
initContainersAdd additional init containers to the NATS pods[]
sidecarsAdd additional sidecar containers to the NATS pods[]
serviceAccount.createEnable creation of ServiceAccount for NATS podtrue
serviceAccount.nameThe name of the ServiceAccount to use.""
serviceAccount.automountServiceAccountTokenAllows auto mount of ServiceAccountToken on the serviceAccount createdfalse
serviceAccount.annotationsAdditional custom annotations for the ServiceAccount{}

Traffic Exposure parameters

NameDescriptionValue
service.typeNATS service typeClusterIP
service.ports.clientNATS client service port4222
service.ports.clusterNATS cluster service port6222
service.ports.monitoringNATS monitoring service port8222
service.nodePorts.clientNode port for clients""
service.nodePorts.clusterNode port for clustering""
service.nodePorts.monitoringNode port for monitoring""
service.sessionAffinityControl where client requests go, to the same pod or round-robinNone
service.sessionAffinityConfigAdditional settings for the sessionAffinity{}
service.clusterIPNATS service Cluster IP""
service.loadBalancerIPNATS service Load Balancer IP""
service.loadBalancerSourceRangesNATS service Load Balancer sources[]
service.externalTrafficPolicyNATS service external traffic policyCluster
service.annotationsAdditional custom annotations for NATS service{}
service.extraPortsExtra ports to expose in the NATS service (normally used with the sidecar value)[]
service.headless.annotationsAnnotations for the headless service.{}
service.headless.publishNotReadyAddressesPublishes the addresses of not ready Podsfalse
ingress.enabledSet to true to enable ingress record generationfalse
ingress.pathTypeIngress Path typeImplementationSpecific
ingress.apiVersionOverride API Version (automatically detected if not set)""
ingress.hostnameWhen the ingress is enabled, a host pointing to this will be creatednats.local
ingress.pathThe Path to NATS. You may need to set this to ‘/*’ in order to use this with ALB ingress controllers./
ingress.ingressClassNameIngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)""
ingress.annotationsAdditional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.{}
ingress.tlsEnable TLS configuration for the host defined at ingress.hostname parameterfalse
ingress.selfSignedCreate a TLS secret for this ingress record using self-signed certificates generated by Helmfalse
ingress.extraHostsThe list of additional hostnames to be covered with this ingress record.[]
ingress.extraPathsAny additional arbitrary paths that may need to be added to the ingress under the main host.[]
ingress.extraTlsThe tls configuration for additional hostnames to be covered with this ingress record.[]
ingress.secretsIf you’re providing your own certificates, please use this to add the certificates as secrets[]
ingress.extraRulesAdditional rules to be covered with this ingress record[]
networkPolicy.enabledEnable creation of NetworkPolicy resourcestrue
networkPolicy.allowExternalThe Policy model to applytrue
networkPolicy.allowExternalEgressAllow the pod to access any range of port and all destinations.true
networkPolicy.extraIngressAdd extra ingress rules to the NetworkPolicy[]
networkPolicy.extraEgressAdd extra ingress rules to the NetworkPolicy[]
networkPolicy.ingressNSMatchLabelsLabels to match to allow traffic from other namespaces{}
networkPolicy.ingressNSPodMatchLabelsPod labels to match to allow traffic from other namespaces{}

Metrics parameters

NameDescriptionValue
metrics.enabledEnable Prometheus metrics via exporter side-carfalse
metrics.image.registryPrometheus metrics exporter image registryREGISTRY_NAME
metrics.image.repositoryPrometheus metrics exporter image repositoryREPOSITORY_NAME/nats-exporter
metrics.image.digestNATS Exporter image digest in the way sha256:aa…. Please note this parameter, if set, will override the tag""
metrics.image.pullPolicyPrometheus metrics image pull policyIfNotPresent
metrics.image.pullSecretsPrometheus metrics image pull secrets[]
metrics.livenessProbe.enabledEnable livenessProbetrue
metrics.livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe15
metrics.livenessProbe.timeoutSecondsTimeout seconds for livenessProbe5
metrics.livenessProbe.periodSecondsPeriod seconds for livenessProbe10
metrics.livenessProbe.failureThresholdFailure threshold for livenessProbe3
metrics.livenessProbe.successThresholdSuccess threshold for livenessProbe1
metrics.readinessProbe.enabledEnable readinessProbetrue
metrics.readinessProbe.initialDelaySecondsInitial delay seconds for readinessProbe5
metrics.readinessProbe.timeoutSecondsTimeout seconds for readinessProbe1
metrics.readinessProbe.periodSecondsPeriod seconds for readinessProbe10
metrics.readinessProbe.failureThresholdFailure threshold for readinessProbe3
metrics.readinessProbe.successThresholdSuccess threshold for readinessProbe1
metrics.customLivenessProbeOverride default liveness probe{}
metrics.customReadinessProbeOverride default readiness probe{}
metrics.containerSecurityContext.enabledEnabled containers’ Security Contexttrue
metrics.containerSecurityContext.seLinuxOptionsSet SELinux options in container{}
metrics.containerSecurityContext.runAsUserSet containers’ Security Context runAsUser1001
metrics.containerSecurityContext.runAsGroupSet containers’ Security Context runAsGroup1001
metrics.containerSecurityContext.runAsNonRootSet container’s Security Context runAsNonRoottrue
metrics.containerSecurityContext.privilegedSet container’s Security Context privilegedfalse
metrics.containerSecurityContext.readOnlyRootFilesystemSet container’s Security Context readOnlyRootFilesystemtrue
metrics.containerSecurityContext.allowPrivilegeEscalationSet container’s Security Context allowPrivilegeEscalationfalse
metrics.containerSecurityContext.capabilities.dropList of capabilities to be dropped["ALL"]
metrics.containerSecurityContext.seccompProfile.typeSet container’s Security Context seccomp profileRuntimeDefault
metrics.resourcesPresetSet container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if metrics.resources is set (metrics.resources is recommended for production).nano
metrics.resourcesSet container requests and limits for different resources like CPU or memory (essential for production workloads){}
metrics.containerPorts.httpPrometheus metrics exporter port7777
metrics.flagsFlags to be passed to Prometheus metrics[]
metrics.service.typeKubernetes service type (ClusterIP, NodePort or LoadBalancer)ClusterIP
metrics.service.portPrometheus metrics service port7777
metrics.service.loadBalancerIPUse serviceLoadBalancerIP to request a specific static IP, otherwise leave blank""
metrics.service.annotationsAnnotations for Prometheus metrics service{}
metrics.service.labelsLabels for Prometheus metrics service{}
metrics.serviceMonitor.enabledSpecify if a ServiceMonitor will be deployed for Prometheus Operatorfalse
metrics.serviceMonitor.namespaceNamespace in which Prometheus is runningmonitoring
metrics.serviceMonitor.labelsExtra labels for the ServiceMonitor{}
metrics.serviceMonitor.jobLabelThe name of the label on the target service to use as the job name in Prometheus""
metrics.serviceMonitor.intervalHow frequently to scrape metrics""
metrics.serviceMonitor.scrapeTimeoutTimeout after which the scrape is ended""
metrics.serviceMonitor.metricRelabelingsSpecify additional relabeling of metrics[]
metrics.serviceMonitor.relabelingsSpecify general relabeling[]
metrics.serviceMonitor.selectorPrometheus instance selector labels{}

Persistence parameters

NameDescriptionValue
persistence.enabledEnable NATS data persistence using PVCs (only for statefulset resourceType)false
persistence.storageClassPVC Storage Class for NATS data volume""
persistence.accessModesPVC Access modes["ReadWriteOnce"]
persistence.sizePVC Storage Request for NATS data volume8Gi
persistence.annotationsAnnotations for the PVC{}
persistence.selectorSelector to match an existing Persistent Volume for NATS’s data PVC{}
persistentVolumeClaimRetentionPolicy.enabledEnable Persistent volume retention policy for NATS statefulsetfalse
persistentVolumeClaimRetentionPolicy.whenScaledVolume retention behavior when the replica count of the StatefulSet is reducedRetain
persistentVolumeClaimRetentionPolicy.whenDeletedVolume retention behavior that applies when the StatefulSet is deletedRetain

Other parameters

NameDescriptionValue
pdb.createEnable/disable a Pod Disruption Budget creationtrue
pdb.minAvailableMinimum number/percentage of pods that should remain scheduled""
pdb.maxUnavailableMaximum number/percentage of pods that may be made unavailable""

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

helm install my-release \
  --set auth.enabled=true,auth.credentials[0].user=my-user,auth.credentials[0].password=T0pS3cr3t \
    oci://REGISTRY_NAME/REPOSITORY_NAME/nats

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.

The above command enables NATS client authentication with my-user as user and T0pS3cr3t as password credentials.

NOTE: Once this chart is deployed, it is not possible to change the application’s access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application’s built-in administrative tools if available.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

helm install my-release -f values.yaml oci://REGISTRY_NAME/REPOSITORY_NAME/nats

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. Tip: You can use the default values.yaml

Troubleshooting

Find more information about how to deal with common errors related to Bitnami’s Helm charts in this troubleshooting guide.

Upgrading

To 9.0.0

This major versions ships by default a new NATS image version that dramatically reduces the image given there’s no distro and it simply includes the NATS binary on top of a scratch base image. As a consequence, there’s no shell available in the image and debugging actions must be performed using sidecars or equivalent mechanisms.

Also, the default path for storing JetStream data is /data/jetstream instead of /data/jetstream/jetstream to avoid stuttering. If you’re upgrading from an existing installation with persisted data, you’ll have to edit the JetStream’s “store_dir” configuration property so it’s compatible with your previous data.

Finally, the following changes are also introduced on chart parameters in this major version update:

  • auth.usersCredentials is renamed to auth.credentials.
  • auth.user and auth.password are deprecated in favor of auth.credentials.

To 8.5.0

This version introduces image verification for security purposes. To disable it, set global.security.allowInsecureImages to true. More details at GitHub issue.

To 8.0.0

This major bump changes the following security defaults:

  • runAsGroup is changed from 0 to 1001
  • readOnlyRootFilesystem is set to true
  • resourcesPreset is changed from none to the minimum size working in our test suites (NOTE: resourcesPreset is not meant for production usage, but resources adapted to your use case).
  • global.compatibility.openshift.adaptSecurityContext is changed from disabled to auto.

This could potentially break any customization or init scripts used in your deployment. If this is the case, change the default values to the previous ones.

To 7.0.0

This new version updates the NATS image to a new version that has support to configure NATS based on bash logic, although this chart overwrites the configuration file so that shouldn’t affect the functionality. It also adds several standardizations that were missing in the chart:

  • Add missing parameters such as existingSecret, containerPorts.*, startupProbe.* or lifecycleHooks.
  • Add missing parameters to extend the services such as service.extraPorts or service.sessionAffinity.
  • Add missing parameters to customize the ServiceMonitor for Prometheus Operator.

Other important changes:

  • The NATS configuration file is no longer retrieved from a ConfigMap but a Secret instead.
  • Regroup the client, cluster and monitoring service into a single service that exposes every port.

Consequences:

  • Backwards compatibility is not guaranteed.

To 6.0.0

  • Some parameters were renamed or disappeared in favor of new ones on this major version. For instance:
    • securityContext.* is deprecated in favor of podSecurityContext and containerSecurityContext.
  • Ingress configuration was adapted to follow the Helm charts best practices.
  • Chart labels were also adapted to follow the Helm charts standard labels.
  • This version also introduces bitnami/common, a library chart as a dependency. More documentation about this new utility could be found here. Please, make sure that you have updated the chart dependencies before executing any upgrade.

Consequences:

  • Backwards compatibility is not guaranteed.

To 5.0.0

On November 13, 2020, Helm v2 support formally ended. This major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.

Deploy chart with NATS version 1.x.x

NATS version 2.0.0 has renamed the server binary filename from gnatsd to nats-server. Therefore, the default values has been changed in the chart, however, it is still possible to use the chart to deploy NATS version 1.x.x using the natsFilename property.

helm install nats-v1 --set natsFilename=gnatsd --set image.tag=1.4.1 oci://REGISTRY_NAME/REPOSITORY_NAME/nats

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.

To 1.0.0

Backwards compatibility is not guaranteed unless you modify the labels used on the chart’s deployments. Use the workaround below to upgrade from versions previous to 1.0.0. The following example assumes that the release name is nats:

kubectl delete statefulset nats-nats --cascade=false

License

Copyright © 2025 Broadcom. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.