[root@VM-0-13-centos ~]# helm repo add flagger https://flagger.app "flagger" has been added to your repositories
安装flagger的CRD
1 2 3 4
[root@VM-0-13-centos ~]# kubectl apply -f https://raw.githubusercontent.com/weaveworks/flagger/master/artifacts/flagger/crd.yaml customresourcedefinition.apiextensions.k8s.io/canaries.flagger.app created customresourcedefinition.apiextensions.k8s.io/metrictemplates.flagger.app created customresourcedefinition.apiextensions.k8s.io/alertproviders.flagger.app created
kubectl apply -k https://github.com/weaveworks/flagger/tree/master/kustomize/tester [root@VM-0-13-centos ~]# kubectl get pod NAME READY STATUS RESTARTS AGE flagger-loadtester-77b756b8d6-vhwxn 1/1 Running 098s
[root@VM-0-13-centos ~]# k get canary -n demo NAME STATUS WEIGHT LASTTRANSITIONTIME httpbin Initialized 02020-12-21T08:39:13Z
[root@VM-0-13-centos ~]# kubectl get all -n demo NAME READY STATUS RESTARTS AGE pod/httpbin-66cdbdb6c5-mqlqt 1/1 Running 052s pod/httpbin-66cdbdb6c5-wgjxs 1/1 Running 011m pod/httpbin-primary-7c49484c4d-rd2xh 1/1 Running 012m pod/httpbin-primary-7c49484c4d-s2tdm 1/1 Running 012m pod/sleep-5b7bf56c54-x99lq 1/1 Running 0165m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/httpbin ClusterIP 172.16.8.254 <none> 8000/TCP 8d service/httpbin-canary ClusterIP 172.16.24.30 <none> 8000/TCP 12m service/httpbin-primary ClusterIP 172.16.96.245 <none> 8000/TCP 12m service/sleep ClusterIP 172.16.77.228 <none> 80/TCP 8d
NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/httpbin 2/2228d deployment.apps/httpbin-primary 2/22212m deployment.apps/sleep 1/1118d
NAME DESIRED CURRENT READY AGE replicaset.apps/httpbin-66cdbdb6c5 2228d replicaset.apps/httpbin-primary-7c49484c4d 22212m replicaset.apps/sleep-5b7bf56c54 1118d
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE horizontalpodautoscaler.autoscaling/httpbin Deployment/httpbin <unknown>/99% 24214m horizontalpodautoscaler.autoscaling/httpbin-primary Deployment/httpbin-primary <unknown>/99% 24212m
NAME STATUS WEIGHT LASTTRANSITIONTIME canary.flagger.app/httpbin Initialized 02020-12-21T08:39:13Z