Skip to content

jaintpharsha/helm-charts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Helm Charts Repository

This repository contains Helm charts for deploying backend, frontend, and MongoDB applications.

📦 Available Charts

  • backend-chart - Backend application deployment
  • frontend-chart - Frontend application deployment
  • mongo-chart - MongoDB StatefulSet deployment

Best Practice

🎯 Use direct charts during development, then package and deploy via repository for all shared and production environments.

🚀 Setting Up GitHub Pages for Helm Repository

Step 1: Enable GitHub Pages

  1. Go to your repository on GitHub
  2. Click on Settings
  3. Scroll down to Pages section (in the left sidebar under "Code and automation")
  4. Under Source, select Deploy from a branch
  5. Select the branch (e.g., main or gh-pages)
  6. Select the folder (e.g., /root or /docs)
  7. Click Save

Step 2: Package and Index Your Charts

# Package all charts
helm package source/backend-chart -d charts/
helm package source/frontend-chart -d charts/
helm package source/mongo-chart -d charts/

# Generate or update the index
helm repo index charts/ --url https://<username>.github.io/<repository-name>/charts/

Step 3: Commit and Push

git add charts/
git commit -m "Update Helm charts and index"
git push origin main

Step 4: Verify

Wait a few minutes for GitHub Pages to deploy, then verify at:

https://<username>.github.io/<repository-name>/charts/index.yaml

📋 Quick Start Example

# Add this repository
helm repo add my-charts https://username.github.io/helm-charts/charts/

# Update repositories
helm repo update

# Search available charts
helm search repo my-charts/

# Install backend chart
helm install my-backend my-charts/backend-chart

# Install with custom values
helm install my-frontend my-charts/frontend-chart -f my-values.yaml

# List installations
helm list

# Upgrade release
helm upgrade my-backend my-charts/backend-chart

# Uninstall
helm uninstall my-backend

🎯 Why Use Packaged Helm Charts?

Key Benefits:

  • ✅ Version control (1.0.0, 1.2.3) - deploy exact versions across environments
  • ✅ Share via URL - no Git access needed
  • ✅ CI/CD ready - automated publishing and deployment
  • ✅ Rollback easily - switch between versions instantly

When to Use:

  • 📁 Direct Charts → Development (fast iteration)
  • 📦 Packaged Charts → Production (versioned, reliable)

📚 Essential Helm Commands

# Add repository
helm repo add my-charts https://username.github.io/helm-charts/charts/
helm repo update

# Search charts
helm search repo my-charts/

# Install
helm install my-app my-charts/backend-chart
helm install my-app my-charts/backend-chart -f values.yaml --version 1.0.0

# Upgrade
helm upgrade my-app my-charts/backend-chart

# List & Status
helm list
helm status my-app

# History (view revisions before rollback)
helm history my-app

# Rollback & Uninstall
helm rollback my-app
helm rollback my-app 3  # rollback to specific revision
helm uninstall my-app

📝 Notes

  • Replace <username> with your GitHub username
  • Replace <repository-name> with your repository name
  • Ensure your index.yaml is properly generated in the charts/ directory
  • Charts should be packaged as .tgz files in the charts/ directory

🐳 Using AWS ECR as Helm Chart Repository

AWS ECR (Elastic Container Registry) supports OCI-based Helm charts, providing private, secure chart storage.

Prerequisites

# Install AWS CLI and configure credentials
aws configure

# Install Helm push plugin
helm plugin install https://github.com/chartmuseum/helm-push

Step 1: Create ECR Repository

# Create a repository for your Helm chart
aws ecr create-repository --repository-name helm-charts/backend-chart --region ap-south-1
aws ecr create-repository --repository-name helm-charts/frontend-chart --region ap-south-1
aws ecr create-repository --repository-name helm-charts/mongo-chart --region ap-south-1

Step 2: Authenticate to ECR

# Login to ECR (valid for 12 hours)
aws ecr get-login-password --region ap-south-1 | helm registry login \
  --username AWS \
  --password-stdin <aws-account-id>.dkr.ecr.ap-south-1.amazonaws.com

Step 3: Package and Push Charts

# Package your charts
helm package source/backend-chart
helm package source/frontend-chart
helm package source/mongo-chart

# Push to ECR
helm push backend-chart-1.0.0.tgz oci://<aws-account-id>.dkr.ecr.ap-south-1.amazonaws.com/helm-charts
helm push frontend-chart-1.0.0.tgz oci://<aws-account-id>.dkr.ecr.ap-south-1.amazonaws.com/helm-charts
helm push mongo-chart-1.0.0.tgz oci://<aws-account-id>.dkr.ecr.ap-south-1.amazonaws.com/helm-charts

Step 4: Install Charts from ECR

# Login first (if not already logged in)
aws ecr get-login-password --region ap-south-1 | helm registry login \
  --username AWS \
  --password-stdin <aws-account-id>.dkr.ecr.ap-south-1.amazonaws.com

# Install chart
helm install my-backend oci://<aws-account-id>.dkr.ecr.ap-south-1.amazonaws.com/helm-charts/backend-chart --version 1.0.0

# With custom values
helm install my-backend oci://<aws-account-id>.dkr.ecr.ap-south-1.amazonaws.com/helm-charts/backend-chart \
  --version 1.0.0 \
  -f values.yaml

Quick Commands Reference

# List ECR repositories
aws ecr describe-repositories --region ap-south-1

# List chart versions in ECR
aws ecr list-images --repository-name helm-charts/backend-chart --region ap-south-1

# Pull chart (for inspection)
helm pull oci://<aws-account-id>.dkr.ecr.ap-south-1.amazonaws.com/helm-charts/backend-chart --version 1.0.0

# Delete chart version
aws ecr batch-delete-image \
  --repository-name helm-charts/backend-chart \
  --image-ids imageTag=1.0.0 \
  --region ap-south-1

ECR vs GitHub Pages

Feature GitHub Pages AWS ECR
Cost Free Pay per storage/transfer
Access Public (default) Private by default
Authentication None required AWS IAM
Best For Open source projects Enterprise/Private charts
Setup Simple Requires AWS account

Recommendation: Use GitHub Pages for public charts, ECR for private enterprise charts.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors