express-ts-app-helm-charts

A Helm chart for deploying a Express Typescript based web application to Kubernetes.

This chart uses a container image hosted on GitHub Container Registry:

ghcr.io/marcuwynu23/express-typescript-sample:latest

📦 Prerequisites


🚀 Installation

Clone the repository and install the chart:

git clone https://github.com/your-repo/express-ts-helm-charts.git
cd express-ts-helm-charts/express-ts
helm install express-ts .

🔄 Upgrade / Reinstall

helm upgrade express-ts .

Clean reinstall:

helm uninstall express-ts
helm install express-ts .

🌐 Accessing the Application

By default, the service is exposed using NodePort:

service:
  type: NodePort
  port: 80

If using Minikube:

minikube service express-ts

If using Docker Desktop / kind:

kubectl get svc

Then open:

http://localhost:<nodePort>

⚙️ Configuration

You can customize the deployment via values.yaml.

🔑 Key Settings

Image

image:
  repository: ghcr.io/marcuwynu23/express-typescript-sample
  tag: "latest"
  pullPolicy: IfNotPresent

Service

service:
  type: NodePort
  port: 80

Ingress (disabled by default)

ingress:
  enabled: false

Enable ingress for production use:

ingress:
  enabled: true
  className: nginx
  hosts:
    - host: your-domain.com
      paths:
        - path: /
          pathType: Prefix

📊 Scaling

Enable autoscaling:

autoscaling:
  enabled: true
  minReplicas: 1
  maxReplicas: 5
  targetCPUUtilizationPercentage: 80

❤️ Health Checks

Liveness and readiness probes are enabled:

livenessProbe:
  httpGet:
    path: /
    port: http

readinessProbe:
  httpGet:
    path: /
    port: http

📁 Project Structure

express-ts/
├── Chart.yaml
├── values.yaml
├── templates/
│   ├── deployment.yaml
│   ├── service.yaml
│   └── ingress.yaml

🛠 Troubleshooting

Check Pods

kubectl get pods

View Logs

kubectl logs <pod-name>

Describe Resource

kubectl describe pod <pod-name>

Render Templates (debug)

helm template .

📌 Notes


📄 License

MIT License