How do I create a helm chart for an app?

You use helm create as follows

helm create java-jar-app

This command scaffolds a complete Helm chart directory with default templates:

java-jar-app/
├── Chart.yaml
├── values.yaml
├── charts/
└── templates/
├── deployment.yaml
├── service.yaml
├── ingress.yaml
├── serviceaccount.yaml
├── hpa.yaml
├── tests/
└── _helpers.tpl

How can I play around with the helm chart files

See https://stackoverflow.com/questions/67293728/what-is-the-difference-between-helm-syntax-something-and-something

To play around with helm use

mkdir testhelm
cd testhelm

helm create mytest

cat <<EOF > mytest/templates/my.yaml
expression1: "23 < 45"
expression2: "23<45"

aTest0: ArgWithNoSpace
aTest1:      Arg with spaces on left and right
aTest2:      "    spaces-on-left-and-right    "
aTest3:      spaces-on-left-and-right   
aTest4:      spaces-on-left-and-right   

aTest5: SomeThing Funky isgoingOn    here
drink2: 
aTest6: Some    Thing Funky isgoingOn        here
aTest7: Some    Thing Funky isgoingOn        here

EOF

To test this out use:

helm template myproj ./mychart | less

In a real K8S environment, you can also do this

helm install --dry-run --debug myproj ./mychart > myproj.yaml

This actually connects to the K8S environment and validates some things. See https://helm.sh/docs/chart_template_guide/debugging/#helm for the official documentation.


<
Previous Post
Notes on using Mockito
>
Blog Archive
Archive of all previous blog posts