Skip to content

Latest commit

 

History

History
141 lines (107 loc) · 2.25 KB

File metadata and controls

141 lines (107 loc) · 2.25 KB

Helm

In this training, we will use Helm to create and customize an application.

Navigate to the folder 26_helm from CLI, before you get started.

Verify if helm is installed

  • Check helm

    helm version
  • Ensure autocompletion is installed

    echo 'source <(helm completion bash)' >> ~/.bashrc && bash

[Optional] Install helm

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

Do a release

  • Show all releases

    helm ls
  • Release with its default values

    helm install my-release-defaults ./my-chart
  • Show all releases

    helm ls
  • Show kubernetes resources

    kubectl get all
  • Delete a release

    helm delete my-release-defaults

Do a customized release

  • Release with a custom values.yaml file

    helm install my-release-custom ./my-chart -f my-values.yaml 
  • Show all installed charts

    helm ls
  • Show kubernetes resources

    kubectl get all

Upgrade a release

  • Change the color in the file my-values.yaml to re-release

    helm upgrade my-release-custom ./my-chart -f my-values.yaml
  • Show all releases

    helm ls
  • Show kubernetes resources

    kubectl get all

Templating

  • Add templating for the deployment in the file ./my-chart/templates/deployment.yaml
    ...
    spec:
    replicas: {{ .Values.replicas }}
    selector:
    ...

Customize your new release

  • Add the replicas to the file my-values.yaml.
    color: magenta
    replicas: 3

Release

  • Re-release

    helm upgrade my-release-custom ./my-chart -f my-values.yaml
  • Show all releases

    helm ls
  • Show kubernetes resources

    kubectl get pods

Tips & Tricks

  • Render yaml files without deploying them

    helm install my-chart ./my-chart --dry-run > dry.run
  • Lint your charts

    helm lint ./my-chart

Cleanup

helm delete my-release-custom

Jump to Home | Previous Training | Next Training