Helm package manager is used to deploy applications in the Kubernetes cluster. By packaging your app using helm allows to deploy it with one command instead of using “kubectl create/apply” command. Another benefit of using helm is that you can easily upgrade and rollback your apps when required because helm uses version control.
Follow the three simple steps creating the helm chart
- Create a skeleton chart using the helm command.
- Update the values.yaml and the templates/ files to meet your deployment requirements
- Package the chart and upload it a helm repository.
To create the files necessary for a new chart, you need to use helm create command as shown below:
# helm create mychart
The above command will create the following directory and files.
To expose the NodePort of the chart, go to the location where you created the chart and open the values.yaml file and change the service type to nodeport:
you can access the app at http://192.168.99.103:32513/
After creating the chart you can dry run it
helm install –dry-run –debug c://sixchart/ –generate-name
To install the chart in minikube:
# helm install mychart/ –generate-name
# helm install mychart -name mychart
# helm list
Note: if you have installed minikube and helm in the windows then run the helm chart create and helm install mychart command from the Windows command prompt. When you use KOPs to create the cluster and running helm in Ubuntu box then run it from Ubuntu.
To see the pod name that has been created by the helm chart run the following kubectl command.
# kubectl get pods
#kubectl describe pods
# kubectl describe pod <specific pod name>
To see list of deployed pods
#kubectl get deployment
#To delete the pod:
Take a note of the pod name using “helm ls” and then delete the pod as shown below.
# helm delete mychart-1559383021
Note: after running the ‘helm delete’ command if you check the Kubernetes deployment and the replica set, you will see the pod is no longer in there.
Helm chart repository server(open source)
There are a number of open-source solution that you can use to host your helm chats. A few of them are:
- Nexus repository
What is ChartMuseum?
ChartMuseum is an open-source Helm Chart Repository written in Go (Golang), with support for cloud storage backends, including Google Cloud Storage, Amazon S3, Microsoft Azure Blob Storage, Alibaba Cloud OSS Storage and Openstack Object Storage.ChartMuseum is a child project under the Helm umbrella, maintained primarily by Codefresh.
To install Jenkins x in windows, you have to install Choco package manager and then run the command below:
choco install jenkins-x
To uninstall Jenkin X, run the command below.
choco uninstall jenkins-x
Jenkins X is a integrated solution of a couple of open-source projects such as Chartmuseum, Nexus, Mongo, Monocular, etc.