Helm chartv19.1.6App 16.18.0

Node.js is a runtime environment built on V8 JavaScript engine. Its event-driven, non-blocking I/O model enables the development of fast, scalable, and data-intensive server applications.

About this chart

Node.js packaged by Bitnami

Node.js is a runtime environment built on V8 JavaScript engine. Its event-driven, non-blocking I/O model enables the development of fast, scalable, and data-intensive server applications.

Overview of Node.js

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.

Azure-ready Charts with Containers from marketplace.azurecr.io

This Helm Chart has been configured to pull the Container Images from the Azure Marketplace Public Repository. The following command allows you to download and install all the charts from this repository.

$ helm repo add bitnami-azure https://marketplace.azurecr.io/helm/v1/repo

TL;DR

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

Introduction

This chart bootstraps a Node deployment on a Kubernetes cluster using the Helm package manager.

It clones and deploys a Node.js application from a Git repository. Optionally, you can set up an Ingress resource to access your application and provision an external database using the Kubernetes service catalog and the Open Service Broker for Azure.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure
  • ReadWriteMany volumes for deployment scaling

Installing the Chart

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

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

These commands deploy Node.js on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation. Also includes support for MariaDB chart out of the box.

Due that the Helm Chart clones the application on the /app volume while the container is initializing, a persistent volume is not required.

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

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override node.fullname template (will maintain the release name)""
fullnameOverrideString to fully override node.fullname template""
namespaceOverrideOverride namespace for resources""
commonLabelsAdd labels to all the deployed resources{}
commonAnnotationsAdd annotations to all the deployed resources{}

Node parameters

NameDescriptionValue
installCommandOverride default container install command (useful when using custom images or repositories)["/bin/bash","-ec","npm install"]
commandOverride default container command (useful when using custom images)["/bin/bash","-ec","npm start"]
argsOverride default container args (useful when using custom images)[]
hostAliasesDeployment pod host aliases[]
extraEnvVarsExtra environment variables to be set on Node container[]
extraEnvVarsCMName of existing ConfigMap containing extra environment variables""
extraEnvVarsSecretName of existing Secret containing extra environment variables""
mongodb.enabledWhether to install or not the MongoDB® charttrue
mongodb.auth.enabledWhether to enable auth or not for the MongoDB® charttrue
mongodb.auth.rootPasswordMongoDB® admin password""
mongodb.auth.usernameMongoDB® custom useruser
mongodb.auth.databaseMongoDB® custom databasetest_db
mongodb.auth.passwordMongoDB® custom passwordsecret_password
externaldb.enabledEnables or disables external database (ignored if mongodb.enabled=true)false
externaldb.sslSet to true if your external database has ssl enabledfalse
externaldb.secretNameSecret containing existing database credentials""
externaldb.typeOnly if using Kubernetes Service Catalog you can specify the kind of broker used. Available options are osbagce
externaldb.broker.serviceInstanceNameIf you provide the serviceInstanceName, the chart will create a ServiceBinding for that ServiceInstance""

Node deployment parameters

NameDescriptionValue
image.registryNodeJS image registrydocker.io
image.repositoryNodeJS image repositorybitnami/node
image.tagNodeJS image tag (immutable tags are recommended)16.18.0-debian-11-r0
image.digestNodeJS image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyNodeJS 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
replicaCountSpecify the number of replicas for the application1
updateStrategy.typeStrategy to use to replace existing pods.RollingUpdate
containerPorts.httpSpecify the port where your application will be running3000
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.[]
podAnnotationsAdditional pod annotations{}
podLabelsAdditional labels for Node pods{}
extraDeployArray of extra objects to deploy with the release (evaluated as a template)[]
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"]
livenessProbe.enabledEnable livenessProbetrue
livenessProbe.pathRequest path for livenessProbe/
livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe60
livenessProbe.periodSecondsPeriod seconds for livenessProbe

Deploy node with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has node 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 chartnode is pinned at v19.1.6 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