Differences between revisions 17 and 24 (spanning 7 versions)
Revision 17 as of 2019-09-17 02:06:14
Size: 2151
Editor: PieterSmit
Comment: shorter
Revision 24 as of 2020-03-05 00:50:45
Size: 3095
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
 Links: [[Azure/Kubernetes]] , [[K8s/Monitoring]]  Links: [[k8s/Azure]] , [[k8s/Monitoring]]
Line 6: Line 6:
== Helm migration v2 to v2 2020 ==
 * https://itnext.io/breaking-changes-in-helm-3-and-how-to-fix-them-39fea23e06ff

== Helm setup 2020-01 ==
 1. Create a dir and add Chart.yaml with version and maintainer.
 2. Create requirements.yaml file with external charts needed
    * search for versions with {{{$ helm search -l stable/rabbitmq-ha }}}
 3. Install local charts from google with {{{$ helm dependency update }}}
 4. Verify with {{{$ helm dependency list }}}
Line 59: Line 68:
}}}
=== HELM install/uninstall ===
 * Please look for official current documentation {{{
helmins() {
 kubectl -n kube-system create serviceaccount tiller
 kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
 helm init --service-account=tiller
}
helmdel() {
 kubectl -n kube-system delete deployment tiller-deploy
 kubectl delete clusterrolebinding tiller
 kubectl -n kube-system delete serviceaccount tiller
 
}

Kubernetes helm chart notes

Helm migration v2 to v2 2020

Helm setup 2020-01

  1. Create a dir and add Chart.yaml with version and maintainer.
  2. Create requirements.yaml file with external charts needed
    • search for versions with $ helm search -l stable/rabbitmq-ha 

  3. Install local charts from google with $  helm dependency update 

  4. Verify with $  helm dependency list 

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

201903 add ingress and static ip

  1. Get k8s nodeResourceGroup grom gui or with

    az aks show --resource-group <rgK8S> --name <clusterName> --query nodeResourceGroup -o tsv
  2. provision static ip with

    az network public-ip create --resource-group <MC_K8S_from_above> --name <cluster-PublicIP> --allocation-method static
  3. assign ip to nginx ingress controller

    helm install stable/nginx-ingress  -namespace kube-system  --set controller.service.loadBalancerIP="52.23.23.32"  --set controller.replicaCount=2

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

HELM install/uninstall

  • Please look for official current documentation

    helmins() {
     kubectl -n kube-system create serviceaccount tiller
     kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
     helm init --service-account=tiller
    }
    helmdel() {
     kubectl -n kube-system delete deployment tiller-deploy
     kubectl delete clusterrolebinding tiller
     kubectl -n kube-system delete serviceaccount tiller
     
    }


CategoryK8sKubernetes

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