Skip to content

Instantly share code, notes, and snippets.

@rpkim
Last active April 30, 2019 00:00
Show Gist options
  • Save rpkim/e7fe4f74c9d09a1f85e4db60a80d2518 to your computer and use it in GitHub Desktop.
Save rpkim/e7fe4f74c9d09a1f85e4db60a80d2518 to your computer and use it in GitHub Desktop.
Helm

Helm

Kubernetes package manager for managing a lot of yaml files

basic flow

[ *bundle of yamls* -> chart ]  <──────────────────────── management tool "helm"
                          └─> "tgz" file is created.         
                                  └─> upload "Chart repository"  | monocular:Web UI for Helm Chart
                                                                 | chartmuseum: Chart for S3,GCS and so on(Cloud storage)
                       
[ helm client (cli tool) ] ──(grpc)──> helm Tiller Server ──(kubernetes api call)──> install chart on kubernetes clusters

how to install

  1. helm client : brew install kubernetes-helm
  2. helm tiller server
  • before you installed, kubeconfig should be setup.
  • helm init

command of helm

  • helm repo update
  • helm repo list
  • helm install stable/redis
  • helm ls
  • helm del erstwhile-quail

directory design of helm

you can create a chart with the basic structure using helm create command

wordpress/
 └─Chart.yaml          # information of Chart
 └─LICENSE
 └─README.md      
 └─requirements.yaml   # dependency of Chart
 └─vaules.yaml         # default value of Chart
 └─charts/             # related chart with this Chart
 └─templates/          # yaml files for kubernetes manifest
 └─templates/NOTES.txt # short manual

how to customizaion the Chart

helm fetch stable/redis

$ tar zxvf redis-4.3.0.tgz
x redis/Chart.yaml
x redis/values.yaml
x redis/templates/NOTES.txt
x redis/templates/_helpers.tpl
x redis/templates/configmap.yaml
x redis/templates/health-configmap.yaml
x redis/templates/metrics-deployment.yaml
x redis/templates/metrics-prometheus.yaml
x redis/templates/metrics-svc.yaml
x redis/templates/networkpolicy.yaml
x redis/templates/redis-master-statefulset.yaml
x redis/templates/redis-master-svc.yaml
x redis/templates/redis-role.yaml
x redis/templates/redis-rolebinding.yaml
x redis/templates/redis-serviceaccount.yaml
x redis/templates/redis-slave-deployment.yaml
x redis/templates/redis-slave-svc.yaml
x redis/templates/secret.yaml
x redis/.helmignore
x redis/README.md
x redis/values-production.yaml

helm install ./redis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment