Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2019-03-13 19:52:28
Size: 237
Editor: PieterSmit
Comment:
Revision 8 as of 2019-03-17 09:06:15
Size: 1458
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
 Links:  Links: [[Azure/Kubernetes]]


== Install 2019-03 ==
 * Ran official curl, and get_helm, all fine
 * When deploying chart got an error, tiller not allowed to create namespaces.
 * Fixed with command belown and helm init --upgrade {{{
kubectl create serviceaccount --namespace kube-system tiller
  serviceaccount "tiller" created

kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
  clusterrolebinding "tiller-cluster-rule" created

kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
  deployment "tiller-deploy" patched
}}}


== Run 2019-02 ==
Line 4: Line 22:
Line 5: Line 24:
Line 6: Line 26:

 * helm status p1
 * helm history p1
 * helm rollback p1 3; roll back to version 3

 * helm rollback; to last successfully DEPLOYED revision

 * helm upgrade --debug --dry-run
 * helm upgrade --install


=== Tricks ===
 * Use checksum of config map to change app annotation and force a new version to be deployed for apps that do not pick up new configs.
   * https://helm.sh/docs/developing_charts/#hooks
   * https://youtu.be/WugC_mbbiWU?t=1043
 * hooks {{{
annotation:
  "helm.sh/hook": " "

}}}

Kubernetes helm chart notes

Install 2019-03

  • Ran official curl, and get_helm, all fine
  • When deploying chart got an error, tiller not allowed to create namespaces.
  • Fixed with command belown and helm init --upgrade

    kubectl create serviceaccount --namespace kube-system tiller
      serviceaccount "tiller" created
    
    kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
      clusterrolebinding "tiller-cluster-rule" created
    
    kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"
    }'
    • deployment "tiller-deploy" patched

}}}

Run 2019-02

  • helm install --name p1 git/helmchart/ --namespace piet --set "env=DEV" --timeout 600
  • Run: helm ls --all p1; to check the status of the release
  • run: helm del --purge p1; to delete it
  • helm status p1
  • helm history p1
  • helm rollback p1 3; roll back to version 3
  • helm rollback; to last successfully DEPLOYED revision
  • helm upgrade --debug --dry-run
  • helm upgrade --install

Tricks

k8s/helm (last edited 2022-08-02 02:27:36 by PieterSmit)