Flagger Install on Kubernetes
This guide walks you through setting up Flagger on a Kubernetes cluster with Helm v3 or Kustomize.
Prerequisites
Flagger requires a Kubernetes cluster v1.16 or newer.
Install Flagger with Helm
Add Flagger Helm repository:
Install Flagger's Canary CRD:
Deploy Flagger for Istio:
Note that Flagger depends on Istio telemetry and Prometheus, if you're installing Istio with istioctl then you should be using the default profile.
For Istio multi-cluster shared control plane you can install Flagger on each remote cluster and set the Istio control plane host cluster kubeconfig:
Note that the Istio kubeconfig must be stored in a Kubernetes secret with a data key named kubeconfig
. For more details on how to configure Istio multi-cluster credentials read the Istio docs.
Deploy Flagger for Linkerd:
Deploy Flagger for App Mesh:
Deploy Flagger for Open Service Mesh (OSM) (requires OSM to have been installed with Prometheus):
You can install Flagger in any namespace as long as it can talk to the Prometheus service on port 9090.
For ingress controllers, the install instructions are:
You can use the helm template command and apply the generated yaml with kubectl:
To uninstall the Flagger release with Helm run:
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:
Install Grafana with Helm
Flagger comes with a Grafana dashboard made for monitoring the canary analysis.
Deploy Grafana in the istio-system namespace:
Or use helm template command and apply the generated yaml with kubectl:
You can access Grafana using port forwarding:
Install Flagger with Kustomize
As an alternative to Helm, Flagger can be installed with Kustomize 3.5.0 or newer.
Service mesh specific installers
Install Flagger for Istio:
Install Flagger for AWS App Mesh:
This deploys Flagger and sets the metrics server URL to App Mesh's Prometheus instance.
Install Flagger for Linkerd:
This deploys Flagger in the linkerd
namespace and sets the metrics server URL to Linkerd's Prometheus instance.
Install Flagger for Open Service Mesh:
This deploys Flagger in the osm-system
namespace and sets the metrics server URL to OSM's Prometheus instance.
If you want to install a specific Flagger release, add the version number to the URL:
Generic installer
Install Flagger and Prometheus for Contour, Gloo, NGINX, Skipper, APISIX or Traefik ingress:
This deploys Flagger and Prometheus in the flagger-system
namespace, sets the metrics server URL to http://flagger-prometheus.flagger-system:9090
and the mesh provider to kubernetes
.
The Prometheus instance has a two hours data retention and is configured to scrape all pods in your cluster that have the prometheus.io/scrape: "true"
annotation.
To target a different provider you can specify it in the canary custom resource:
Customized installer
Create a kustomization file using Flagger as base and patch the container args:
Last updated