helm-charts

Nginx Helm Chart

This Helm chart deploys Nginx on Kubernetes, using the ghcr.io/yobasystems/alpine-nginx:1.29.3 container image.

Chart Details

Prerequisites

Installing the Chart

To install the chart with the release name my-nginx (assuming you have added the yobasystems repository):

helm install my-nginx yobasystems/nginx

Configuration

The configurable parameters for the Nginx chart and their default values are listed in values.yaml. You can customize these parameters to suit your deployment needs.

Parameter Description Default
replicaCount Number of Nginx replicas 1
image.repository Nginx image repository ghcr.io/yobasystems/alpine-nginx
image.pullPolicy Image pull policy IfNotPresent
image.tag Nginx image tag (defaults to chart’s appVersion) 1.29.3
serviceAccount.create Whether to create a service account true
serviceAccount.name Name of the service account to use "" (generated)
podSecurityContext Pod security context {}
securityContext Container security context {}
service.type Kubernetes service type ClusterIP
service.port Nginx service port 80
livenessProbe.* Liveness probe configuration (see values.yaml)
readinessProbe.* Readiness probe configuration (see values.yaml)
resources CPU/Memory resource requests/limits {}
autoscaling.* HPA configuration (disabled by default)
persistence.content.enabled Enable persistence for website content false
persistence.content.annotations Annotations for the content PVC {}
persistence.content.storageClass Storage class for content PVC "" (default provisioner)
persistence.content.accessMode Access mode for content PVC ReadWriteOnce
persistence.content.size Size of the content PVC 10Gi
persistence.content.existingClaim Use an existing PVC for content nil
persistence.content.mountPath Mount path for content volume /usr/share/nginx/html
nodeSelector Node selector for pod assignment {}
tolerations Tolerations for pod assignment []
affinity Affinity for pod assignment {}

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

helm install my-nginx yobasystems/nginx \
  --set replicaCount=3 \
  --set service.type=LoadBalancer

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

helm install my-nginx yobasystems/nginx -f myvalues.yaml

Tip: You can use helm show values yobasystems/nginx to see all configurable options.

Persistence

This chart can be configured to use PersistentVolumeClaims for storing Nginx data, such as website content or logs. You can configure persistence in the values.yaml file.

To enable persistence (example for website content):

--set persistence.content.enabled=true
--set persistence.content.size=10Gi

Uninstalling the Chart

To uninstall/delete the my-nginx deployment:

helm uninstall my-nginx

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

Note: PersistentVolumeClaims (PVCs) are not automatically deleted when uninstalling the chart. You will need to manually delete them if you no longer need the data:

# Example: Replace with actual PVC names based on your release and values.yaml
kubectl delete pvc my-nginx-content

(Replace my-nginx with your release name if different, and my-nginx-content with the actual PVC name(s).)

Contributing

Feel free to contribute to this chart by submitting issues or pull requests.