Skip to content

Helm - Helmfile

Helm helps you manage Kubernetes applications — Helm Charts help you define,
install, and upgrade even the most complex Kubernetes application.

It is a package manager for Kubernetes... https://helm.sh/

Registry: https://artifacthub.io/packages/search?kind=0

Install Helm CLI

https://helm.sh/docs/intro/install/

Note

if you built a k8s Docker image for CI/CD use,
you should install helm in the same image.
They work together !

Configure helm with kubectl

DeprecatedThis was was for helm v2, now Tiller is deprecated for Helm v3
      ---
      apiVersion: v1
      kind: ServiceAccount
      metadata:
        name: tiller
      ---
      kind: RoleBinding
      apiVersion: rbac.authorization.k8s.io/v1
      metadata:
        name: tiller-adm-binding
      subjects:
      - kind: ServiceAccount
        name: tiller
      roleRef:
        kind: ClusterRole
        name: admin
        apiGroup: rbac.authorization.k8s.io

      ## Apply

      kubectl apply -f tiller-admin-role.yaml -n YOUR_NAMESPACE
      Deploy Tiller agent:

      ##utiliser le token du tille rplutot que ce lui du serviceaccount
      helm init --wait --tiller-namespace $YOUR_NAMESPACE --service-account tiller
Usage - helm
      # Generate new Helm Chart
      helm create $myChartName

      # Deploy current helm folder
      helm install elk-data  ./

      # Deploy distant helm package

      helm repo add $rep_name $repo_url  # [--username $user  --password $ppassword]
      helm repo update
      helm install example $repo_name/$chart_name

      //templating
      helm template .
      helm template . -x templates/toto
      helm template . -f qa.yaml
      helm template .  --output-dir .

Helmfile

Helmfile is a declarative spec for deploying helm charts. It lets you...

  • Keep a directory of chart value files and maintain changes in version control.
  • Apply CI/CD to configuration changes.
  • Periodically sync to avoid skew in environments.

https://github.com/helmfile/helmfile