Flagger Set Up
Install App Mesh Prometheus Helm Chart
helm upgrade -i appmesh-prometheus eks/appmesh-prometheus \
--namespace appmesh-system \
--set serviceAccount.create=false \
--set serviceAccount.name=appmesh-controller
Install Flagger
Add Flagger Helm repository:
helm repo add flagger https://flagger.app
Install Flagger’s Canary CRD:
kubectl apply -f https://raw.githubusercontent.com/weaveworks/flagger/master/artifacts/flagger/crd.yaml
Deploy Flagger in the appmesh-system namespace:
helm upgrade -i flagger flagger/flagger \
--namespace=appmesh-system \
--set crd.create=false \
--set meshProvider=appmesh:v1beta2 \
--set metricsServer=http://appmesh-prometheus:9090 \
--set serviceAccount.create=false \
--set serviceAccount.name=appmesh-controller
Set up the horizontol pod autoscaler
Install the Horizontal Pod Autoscaler (HPA) metrics provider:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.4.1/components.yaml
After a minute, the metrics API should report CPU and memory usage for pods. You can verify status of the metrics API:
kubectl get apiservice v1beta1.metrics.k8s.io -o json | jq '.status'
kubectl -n kube-system top pods