2

I have a Wordpress Helm chart, and a seperate ingress definition to go along with it, which I specified in a wordpress-deployment.yaml file.

My workflow for installing would be:

  • Install the helm chart using a wordpress-values.yaml file for values
  • Apply the wordpress-deployment.yaml deployment file using kubectl

I don't like that these steps are separated (e.g. what if I forget about installing the Helm chart?)

I would like to use K8S in a professional setting. What would be the "best practice" way of going about this kind of file structure? Is there a more structured / less manual way of handling this? Ideally I would like to run 1 command which handles both installing helm charts & the accompanying deployment files & configurations.

Thanks in advance!

2 Answers 2

1

Helm supports sub charts.

You could make your ingress yaml file into its own helm chart.

You could then make a base chart then put both of your charts in it as subcharts. (Or have one of your charts as the "Main chart" and another as a subchart.)

0

I would suggest try out Terraform with the helm provider. I work with this every day and all of our helm charts have custom values files for deployment. I guess this can be considered a "best practice" depending on the company. So how the flow goes:

  1. We have a custom app all in K8S.
  2. We set up a helm_release with terraform.
  3. We specify the custom values file => file("${path.module}/kubewatch-values.yaml")
  4. In the terraform you can specify the chart, its version, and the name(or other settings). You also point it to the values file as above(point 3).
  5. You then apply the terraform which deploys the helm chart with your custom values file. And that should be all, its a clean and simple solution and you can have that stored in Git as well.

Example => Terraform Examples

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.