vite-react-app-helm-charts

A Helm chart for deploying a Vite-based web application to Kubernetes.

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

ghcr.io/marcuwynu23/vite-app-sample:latest

Prerequisites


Installation

Clone the repository and install the chart:

git clone https://github.com/your-repo/vite-app-helm-charts.git
cd vite-app-helm-charts/vite-app
helm install vite-app .

Upgrade / Reinstall

helm upgrade vite-app .

Clean reinstall:

helm uninstall vite-app
helm install vite-app .

Accessing the Application

By default, the service is exposed using NodePort:

service:
  type: NodePort
  port: 80

If using Minikube:

minikube service vite-app

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/vite-app-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

vite-app/
├── 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