The previous post setup the cluster and created a Helm chart for all the services required in the kube-system namespace.
Installing the subsequent services like PiHole and Jellyfin will require separate namespaces. This post will cover using Helmfile and refactoring charts.
Install Helmfile Link to heading
On MacOS run brew update && brew install helmfile
. Follow the instructions in the README for other operating systems.
Git Structure Link to heading
Helm allows for grouping of logical sets of services into umbrella charts, which is the structure of the original chart setup.
With Helmfile, this is no longer needed. The metallb
, ingress-nginx
and cert-manager
dependencies can be defined as separate releases in helmfile.yaml
which allows for updating each of them separately as new versions become available.
$ tree -a -I .git
.
├── .gitignore
├── README.md
└── helmfile.yaml
0 directories, 4 files
Helmfile Link to heading
helfile.yaml
now looks like this.
repositories:
- name: stable
url: https://charts.helm.sh/stable
- name: metallb
url: https://metallb.github.io/metallb
- name: ingress-nginx
url: https://kubernetes.github.io/ingress-nginx
- name: cert-manager
url: https://charts.jetstack.io
releases:
- name: metallb
namespace: kube-system
chart: metallb/metallb
version: 0.11.0
values:
- configInline:
address-pools:
- name: default
protocol: layer2
addresses:
- 192.168.1.50/27
- name: ingress-nginx
namespace: kube-system
chart: ingress-nginx/ingress-nginx
version: 4.0.13
values:
- defaultBackend:
enabled: false
- name: cert-manager
namespace: kube-system
chart: cert-manager/cert-manager
version: 1.7.0
values:
- installCRDs: true
Install the helm releases Link to heading
helfile sync
Verify Link to heading
kubectl get pods -n kube-system
kubectl get services -n kube-system
The helm releases will also be visible in helm.
$ helm ls -A
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
cert-manager kube-system 1 2022-02-02 13:52:42.737763 +0800 +08 deployed cert-manager-v1.7.0 v1.7.0
ingress-nginx kube-system 1 2022-02-02 13:52:43.271475 +0800 +08 deployed ingress-nginx-4.0.13 1.1.0
metallb kube-system 1 2022-02-02 13:52:43.870754 +0800 +08 deployed metallb-0.11.0 v0.11.0