Production-Ready Universal Kubernetes Helm Chart Template
Deploy any application to Kubernetes with a single values file using this universal Helm chart boilerplate from Cogito Group Ltd. Eliminate the need to write custom Helm charts for every microservice.
Copyright [2024] [Cogito Group Ltd]
This Universal Helm Chart Boilerplate provides a comprehensive, reusable Helm chart template for deploying any application to Kubernetes:
Repository: https://github.com/cogitogroupltd/helm-chart-boilerplate Helm Repository: https://cogitogroupltd.github.io/helm-chart-boilerplate
# Add the Helm Chart Boilerplate repository
helm repo add helm-boilerplate https://cogitogroupltd.github.io/helm-chart-boilerplate
helm repo update helm-boilerplate
# Deploy your application using the common chart
helm install my-app helm-boilerplate/app --values your-values.yaml
This Kubernetes Helm chart boilerplate provides everything needed for production deployments:
.Values.configenv.Values.configMap.files.Values.secenv.Values.secret.files.Values.services.Values.persistence.Values.initContainers.Values.RedisSidecar.Values.hookSee values.yaml for complete configuration options.
This Universal Helm Chart Boilerplate has been successfully tested on:
This universal Helm chart boilerplate eliminates the need to write custom charts for each application. Instead, define everything in a values.yaml file:
# Example values.yaml for deploying any application
replicaCount: 3
image:
repository: myregistry/myapp
tag: "1.0.0"
pullPolicy: IfNotPresent
# Environment variables from ConfigMap
configenv:
LOG_LEVEL: "info"
API_URL: "https://api.example.com"
# Secret environment variables
secenv:
DATABASE_PASSWORD: "mysecretpassword"
API_KEY: "secretapikey"
# Service configuration
service:
type: ClusterIP
port: 80
targetPort: 8080
# Horizontal Pod Autoscaler
hpa:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 70
# Persistent storage
persistence:
enabled: true
size: 10Gi
mountPath: /data
Deploy an SSH bastion server for secure cluster access using the Helm chart boilerplate.
See README.md for more information.
cd helm-chart-boilerplate
helm upgrade --install sshd ./charts/common \
--values ./examples/common-sshd/values-override.yaml
Deploy a backend microservice with horizontal pod autoscaling using the Helm boilerplate.
See README.md for more information.
cd helm-chart-boilerplate
helm upgrade --install myrelease ./charts/common \
--values ./examples/common-backend-autoscaling/values-override.yaml
This example demonstrates all features of the Helm chart boilerplate:
/app/dataPrerequisites: Configure AWS credentials and ECR access
export AWS_ACCOUNT=123456789012
export AWS_REGION=us-east-1
kubectl delete secret regcred --ignore-not-found && \
kubectl create secret docker-registry regcred \
--docker-server=${AWS_ACCOUNT}.dkr.ecr.${AWS_REGION}.amazonaws.com \
--docker-username=AWS \
--docker-password=$(aws ecr get-login-password) \
--namespace=app
Deploy application:
cd helm-chart-boilerplate
helm upgrade --install myrelease ./charts/common \
--values ./examples/common-complete/values-override.yaml \
--namespace app
Advanced deployment with runtime variables:
export AWS_SECRET_ACCESS_KEY=<your-secret-key>
export RABBIT_PASSWD=<rabbitmq-password>
helm upgrade --install myrelease ./charts/common \
--values ./examples/common-complete/values-override.yaml \
--namespace app \
--set secenv.RABBIT_PASSWD=${RABBIT_PASSWD} \
--set image.pullPolicy=Always \
--set "initContainers[0].env[1].value=${AWS_SECRET_ACCESS_KEY}"
Deploy a NodeJS Express server with rawYAML injection using the Helm boilerplate.
See README.md for more information.
cd helm-chart-boilerplate
export DB_PASSWORD=pass123
helm upgrade --install node-express ./charts/common \
--values ./examples/common-node-express/values-override.yaml \
--set secenv.DB_PASSWORD=${DB_PASSWORD}
Deploy Microsoft Orleans applications with RBAC using the Helm chart boilerplate.
See README.md for more information.
cd helm-chart-boilerplate
export DB_PASSWORD=pass123
helm upgrade --install orleans-app ./charts/common \
--values ./examples/common-orleans/values-override.yaml \
--set secenv.DB_PASSWORD=${DB_PASSWORD}
Deploy Nginx with static file mounts using the Helm boilerplate.
cd helm-chart-boilerplate
helm upgrade --install common-nginx ./charts/common \
--values ./examples/common-nginx-static/values-override.yaml
See values.yaml for all available configuration options.
Basic Deployment:
replicaCount: 3
image:
repository: myregistry/myapp
tag: "1.0.0"
ConfigMap and Secrets:
configenv:
MY_VAR: "value"
secenv:
MY_SECRET: "secretvalue"
Autoscaling:
hpa:
enabled: true
minReplicas: 2
maxReplicas: 10
Storage:
persistence:
enabled: true
size: 10Gi
mountPath: /data
We welcome contributions! To contribute:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This Universal Helm Chart Boilerplate is licensed under the terms specified in the LICENSE file.
Copyright [2024] [Cogito Group Ltd]
Keywords: Helm Chart, Kubernetes, Helm Boilerplate, Universal Helm Chart, Kubernetes Deployment, Cloud Native, DevOps, Microservices, ConfigMap, Secrets, HPA, Autoscaling, PersistentVolume, Kubernetes Template, Helm Template, Generic Helm Chart