Running an example Helmfile release deploying httpbin app in Minikube.
Please have a look at the blog article I wrote for a better overview.
.
├── README.md
├── charts
│ └── httpbin
│ ├── Chart.yaml
│ └── templates
│ ├── deployment.yaml
│ ├── service.yaml
│ └── serviceaccount.yaml
├── default-values.yaml
├── environments.yaml
├── example-environment-values.yaml
├── helmfile.yaml
└── values.yaml.gotmpl
charts/
contains a minimalhttpbin
Helm chart definition and all the resources' templates.default-values.yaml
is thedefault
environment set of values.environments.taml
defines bothdefault
andexample
environments with their respective values files.example-environment-values.yaml
is theexample
environment set of values.helmfile.yaml
is where all releases are defined.values.yaml.gotmpl
uses GO templating to reference different values. This template will be used as a centralised definition to be used by different environments.
I am using a Mac, so every installation is pointing to using that OS; all the below have their options when it comes to different platforms.
-
As a first prerequisite, Minikube.
brew install minikube
-
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"
-
Then Helmfile
brew install helmfile
Start Minikube cluster.
minikube start
Clone this repository.
git clone https://github.com/marianogg9/helmfiling.git
cd helmfiling
Run Helmfile in dry-run mode (to see what will be deployed).
helmfile -e example diff
Then deploy resources.
helmfile -e example apply
To check deployment status.
helmfile status
And many more CLI commands to explore.
To modify a value, release, template or resource, just update its definition and visualize future changes.
helmfile -e example diff
And then deploy.
helmfile -e example apply
Once finished, let's clean all up by deleting Helmfile releases (all resources defined in a release will be deleted).
helmfile -e example destroy
Keep in mind the above destroy
command will not ask for a confirmation.
Then delete Minikube cluster.
minikube delete --all