node{
stage('Install and configuire helm'){
sh 'curl -fsSL -o get_helm.sh
https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3'
sh 'chmod 700 get_helm.sh'
sh './get_helm.sh'
stage('Initialize helm'){
sh 'helm init --client-only --kubeconfig=$HOME/.kube/kubeconfig'
stage('Install tiller plugin')
sh 'helm plugin install https://github.com/rimusz/helm-tiller
--kubeconfig=$HOME/.kube/kubeconfig '
stage('Release helloapp using helm chart'
sh 'bash scripts/release-helloapp.sh $TAG'
stage("Deploy To Kubernetes Cluster"){
sh 'kubectl apply -f springBootMongo.yml'
}
}
pipeline {
agent any
staeges {
stage('Install and configuire helm') {
steps {
sh 'curl -fsSL -o get_helm.sh
https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3'
sh 'chmod 700 get_helm.sh'
sh './get_helm.sh'
}
}
}
}
sr/local/bin
gcr.io/kubernetes-helm/tiller:v2.7.0
helm installattion
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
helm repo add stable https://charts.helm.sh/stable
helm search repo stable
helm repo update
helm install stable/mysql --generate-name
helm ls
<smiling-penguin>
helm uninstall smiling-penguin
helm install happy-panda stable/mariadb -- to do release
helm status happy-panda --to check release state
helm show values stable/mariadb --- to Customizing the Chart Before Installing
You can then override any of these settings in a YAML formatted file, and then pass
that file during installation.
$ echo '{mariadbUser: user0, mariadbDatabase: user0db}' > config.yaml
$ helm install -f config.yaml stable/mariadb --generate-name
helm upgrade -f panda.yaml happy-panda stable/mariadb
We can use helm get values to see whether that new setting took effect.
helm get values happy-panda
helm rollback happy-panda 1
helm history [RELEASE] to see revision numbers for a certain release.
helm <command> --help
helm uninstall happy-panda -- to uninstall a release
helm list -- to see all of your currently deployed releases
In previous versions of Helm, when a release was deleted, a record of its deletion
would remain. In Helm 3, deletion removes the release record as well. If you wish
to keep a deletion release record, use
helm uninstall --keep-history
will show you all release records that Helm has retained, including records for
failed or deleted items (if --keep-history was specified
helm list --all
Note that because releases are now deleted by default, it is no longer possible to
rollback an uninstalled resource.
helm repo list
helm repo add dev https://example.com/dev-charts
helm repo update
helm repo remove
Creating Your Own Charts
helm create deis-workflow
Now there is a chart in ./deis-workflow. You can edit it and create your own
templates.
As you edit your chart, you can validate that it is well-formed by running helm
lint.
When it's time to package the chart up for distribution, you can run the helm
package command:
helm package deis-workflow
deis-workflow-0.1.0.tgz
And that chart can now easily be installed by helm install:
helm install deis-workflow ./deis-workflow-0.1.0.tgz