Helm chart for k8s deployments.
This Helm chart deploys a containerized backend application on Kubernetes with flexible configuration for networking, scaling, scheduling, and environment-specific deployment strategies. It is designed to work well on Amazon EKS, supporting AWS ALB Ingress, NGINX Ingress, autoscaling, and common production requirements.
This chart provides:
- Deployment of a backend container from AWS ECR
- Configurable Service (ClusterIP / Headless)
- AWS ALB Ingress or NGINX Ingress support
- Horizontal Pod Autoscaler (HPA)
- Vertical Pod Autoscaler (VPA)
- ConfigMaps for files and environment variables
- Node affinity, tolerations, and node selectors
- Liveness & readiness probes
- RollingUpdate or Recreate deployment strategies
- Git metadata injection for traceability
- Kubernetes v1.32+
- Helm v3.x
- (For ALB) AWS Load Balancer Controller installed
- (For NGINX) NGINX Ingress Controller installed
- Access to AWS ECR (if using private images)
helm-base-chart/
├── Chart.yaml
├── values.yaml
├── templates/
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ ├── hpa.yaml
│ ├── vpa.yaml
│ └── configmap.yaml
└── README.md
helm install backend-app ./helm-base-chart \
--namespace dev \
--create-namespacehelm upgrade backend-app ./helm-base-chart -n devhelm uninstall backend-app -n devAll configuration is controlled via `values.yaml`. If needed, can pass custom values as `stage.values.yaml` as `args`.image:
repository: <aws-ecr-repo>
tag: be_v-5
pullPolicy: IfNotPresentservice:
enabled: true
type: ClusterIP
headless: false
port: 80
targetPort: 6000| Field | Description |
|---|---|
| enabled | Enable or disable Service creation |
| type | Kubernetes Service type |
| headless | Enable headless service |
resources:
limits:
memory: 128Mi
cpu: 500m
requests:
memory: 64Mi
cpu: 250mDefines CPU and memory requests and limits for the container.
imagePullSecrets:
enabled: false
values:
- name: credreg-1Enable this when pulling images from private registries.
gitBranch: master
gitCommit: "HEAD"
gitBuildNumber: "10"
gitBuildTimestamp: "20241010"These values can be injected as labels or environment variables for:
- Debugging
- Deployment traceability
- Observability
affinity:
enabled: falseSupports:
- Required and preferred node affinity
- Spot / on-demand node scheduling
command:
enabled: falseOverride the container entrypoint when required.
ingress:
enabled: true
className: alb| Field | Description |
|---|---|
| annotations | ALB-specific annotations |
| rules | Host and path rules |
| tls | TLS configuration |
nginx:
enabled: falseUse this when deploying with the NGINX ingress controller instead of ALB.
autoscaling:
enabled: falseSupports:
- CPU-based scaling
- Memory-based scaling
| Field | Description |
|---|---|
| minReplicas | Minimum replicas |
| maxReplicas | Maximum replicas |
vpa:
enabled: false
updateMode: "Off"Controls automatic resource tuning.
configmap:
enabled: falseSupports:
- File-based configuration
- Environment variables
Useful for application configuration without rebuilding images.
nodeSelector:
enabled: falseRestrict pods to specific nodes.
tolerations:
enabled: falseAllow scheduling onto tainted nodes.
livenessProbe:
enabled: falsereadinessProbe:
enabled: falseImproves application reliability and rollout safety.
lowerenvStrategy:
enabled: trueUses 'Recreate' strategy for dev/test environments.
strategy:
type: RollingUpdate
maxUnavailable: 50%
maxSurge: 1Recommended for staging and production.
helm install backend-app ./helm-base-chart \
--set image.tag=be_v-6 \
--set autoscaling.enabled=true
--values stage.values.yaml- Use
RollingUpdatefor production - Enable probes for zero-downtime deployments
- Use Spot enablement for cost cutting
- Use HPA for variable traffic
- Use ConfigMaps for non-secret configs
- Track builds using Git metadata