CloudDrove created this HelmChart so that One can deploy as many as application with common template and separate override-values.yaml for each application
Below is an installer script that will automatically grab the latest version of Helm and install it locally.
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh
Binary downloads of the Helm client can be found on the Releases page. For installation in different Operating Systems you can follow this guide.
helmchart
├── Chart.yaml
├── README.md
├── templates
│ ├── configmap.yaml
│ ├── cronjob.yaml
│ ├── deployment.yaml
│ ├── gateway.yaml
│ ├── _helpers.tpl
│ ├── hpa.yaml
│ ├── ingress.yaml
│ ├── NOTES.txt
│ ├── poddisruptionbudget.yaml
│ ├── pvc.yaml
│ ├── pv.yaml
│ ├── secret.yaml
│ ├── serviceaccount.yaml
│ ├── servicemonitor.yaml
│ ├── service.yaml
│ ├── storageclass.yaml
│ ├── tests
│ │ └── test-connection.yaml
│ └── virtualservice.yaml
├── values.schema.json
└── values.yaml
Chart.yaml
: It contains a description of the chart such as Chart’s version
appVersion
etc.templates/
: This directory is for YAML files for Kubernetes resources to be created using this chart.tests
: This directory contains a yaml file for creating a pod to test the cluster accessibility and networking related configurations.
values.yaml
: This file is important to templates and contains the default values for a chart. These values can be overridden by users in helmchart/config/override-values.yaml and then can be used during helm install/upgrade by specifying path of this override-values.yaml. $ helm repo add clouddrove https://charts.clouddrove.com/
$ helm repo update clouddrove
Get the overrides-values.yaml from HERE.
replicaCount: 2
image:
repository: nginx
pullPolicy: IfNotPresent
tag: "latest"
service:
enabled: true
type: NodePort
port: 80
$ helm template release-name clouddrove/helmchart -f override-app1-values.yaml --debug
clouddrove
as releasename
.
$ kubectl create namespace clouddrove
$ helm install clouddrove clouddrove/helmchart -f override-app1-values.yaml --namespace=clouddrove --debug
--debug
flag to get more information of helm installation.helm upgrade clouddrove clouddrove/helmchart -f override-app1-values.yaml --namespace=clouddrove --debug
upgrade
and --install
together, this option will Install the helmchart if not present.
$ helm upgrade --install clouddrove clouddrove/helmchart -f override-app1-values.yaml --namespace=clouddrove --debug
helm list
it should be deployed
$ helm list --namespace=clouddrove
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
clouddrove clouddrove 1 2023-05-23 20:28:39.571788019 +0530 IST deployed helmchart-0.0.6 0.0.6
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/clouddrove-helmchart NodePort 10.100.87.24
NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/clouddrove-helmchart 2/2 2 2 19s
NAME DESIRED CURRENT READY AGE replicaset.apps/clouddrove-helmchart-8445d9c6c6 2 2 2 19s
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
horizontalpodautoscaler.autoscaling/clouddrove-helmchart Deployment/clouddrove-helmchart
podname
with the name of your pod. In above example podname is clouddrove-helmchart-8445d9c6c6-6lrmn
$ kubectl describe pod podname -n clouddrove | grep Node: | awk -F / '{print $2}'
192.172.100.10
service
by which your container is mapped with Node’s Port. In above example port number is 32245
192.172.100.10:32245
in your browserimage: repository: tutum/hello-world pullPolicy: IfNotPresent tag: “latest”
service: enabled: true type: NodePort port: 80
``` - Follow the same steps deploy this chart and get the IP & NodePort of second application to open webpage on your browser.
$ helm list --namespace=clouddrove
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
clouddrove clouddrove 1 2023-05-23 21:05:03.061111663 +0530 IST deployed helmchart-0.0.6 0.0.6
$ helm uninstall clouddrove --namespace=clouddrove
reclaimPolicy
was set to Retain
$ kubectl get persistentVolume
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
clouddrove-helmchart 512Mi RWO Retain Bound clouddrove/clouddrove-helmchart clouddrove-helmchart 114s
$ kubectl delete persistentVolume clouddrove-helmchart
If you come accross a bug or have any feedback, please log it in our issue tracker, or feel free to drop us an email at hello@clouddrove.com.
If you have found it worth your time, go ahead and give us a ★ on our GitHub!
At CloudDrove, we offer expert guidance, implementation support and services to help organisations accelerate their journey to the cloud. Our services include docker and container orchestration, cloud migration and adoption, infrastructure automation, application modernisation and remediation, and performance engineering.
We are The Cloud Experts!
We ❤️ Open Source and you can check out our other modules to get help with your new Cloud ideas.