flagger/docs/gitbook/install/install-flagger.md

1.8 KiB

Install Flagger

Before installing Flagger make sure you have Istio running with Prometheus enabled. If you are new to Istio you can follow this GKE guide Istio service mesh walk-through.

Prerequisites

  • Kubernetes >= 1.9
  • Istio >= 1.0
  • Prometheus >= 2.6

Install with Helm and Tiller

Add Flagger Helm repository:

helm repo add flagger https://flagger.app

Deploy Flagger in the istio-system namespace:

helm upgrade -i flagger flagger/flagger \
--namespace=istio-system \
--set metricsServer=http://prometheus.istio-system:9090

Enable Slack notifications:

helm upgrade -i flagger flagger/flagger \
--namespace=istio-system \
--set slack.url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
--set slack.channel=general \
--set slack.user=flagger

Install with kubectl

If you don't have Tiller you can use the helm template command and apply the generated yaml with kubectl:

# generate
helm template flagger/flagger \
--name flagger \
--namespace=istio-system \
--set metricsServer=http://prometheus.istio-system:9090 \
--set controlLoopInterval=1m > $HOME/flagger.yaml

# apply
kubectl apply -f $HOME/flagger.yaml

Uninstall

To uninstall/delete the flagger release with Helm run:

helm delete --purge flagger

The command removes all the Kubernetes components associated with the chart and deletes the release.

Note that on uninstall the Canary CRD will not be removed. Deleting the CRD will make Kubernetes remove all the objects owned by Flagger like Istio virtual services, Kubernetes deployments and ClusterIP services.

If you want to remove all the objects created by Flagger you have delete the Canary CRD with kubectl:

kubectl delete crd canaries.flagger.app