开发者学堂课程【4天定制混合云应用交付流水线-1024程序员节创造营公益课:进阶:对接 Istio 实现应用灰度发布实践】学习笔记,与课程紧密联系,让用户快速学习知识。
课程地址:https://developer.aliyun.com/learning/course/893/detail/14270
进阶:对接 Istio 实现应用灰度发布实践
内容简介:
一、KubeVela addon
二、对接 Istio 实现应用灰度发布
一、KubeVela addon
KubeVela addon 也就是 KubeVela 的插件,插件包括很多:
插件:terraform ,
简介:提供云资源(默认已安装)
https://github.com/oam-dev/terraform-controller
插件:fluxcd ,
简介:提供 Helm、Kustomize 组件的部署功能
内置功能: kustomize、helm
插件对应开源项目: https://fluxcd.io/
插件:kruise,
简介: 提供比 Kubernetes 原生更强大的工作负载套件,
内置功能: cloneset ,
插件对应开源项目:https://openkruise.io/
插件:prometheus ,
简介:提供基于 Promethus 的基础监控功能,
插件对应开源项目: https://prometheus.io/
插件:keda ,
简介:提供基于事件驱动的工作负载自动扩缩容功能 ,
插件对应开源项目:https://keda.sh/
插件:ocm ,
简介:提供多集群功能的系统插件,
插件对应开源项目: http://open-cluster-management.io/
插件:observability ,
简介:为 KubeVela core 提供系统级别的监控,
也可以为应用提供业务级别的监控。
二、对接 Istio 实现应用灰度发布
$vela addon enable istio
$kubectl label namespace default istio-injection=enabled
spec:
componants:
nane:reviews
type:webservice
properties:
nage:
docker.so/stio/exanples-bookinrb-rev1eIs-v2:1.16.2port:9888
volunes:
nate:wip-output
type:cnptyDir
mountPath:/opt/ibn/wlp/output
name:tnp
type:enptyDir
nountPath:/tmp
traits:
type:canary-traffic
properties:
port:
-9888
type:roliout
properties:
targetSize:2
This neons to rollout two pore replicosin two botches. rolLoutBatches:
-replicas:2
productpage
type:webservice
properties:
inage:docker.1o/istio/exanples-bookinfo-productpage-v1:1.16.2port:9888
traits:
type:expose
properties:
port:
-9888
workf
l
ow:
steps:
nane:rollout-1st-batch
type:canary-rollout
properties:
just upgradeffrst botch of component
batchPartition:8
traffic:
aeightedTargets:
revision:reviews-
v1
weight:98#90%shiftto new version
revision:reviews-v2
weight:16
#
18%shift to new version
give user time to verify part of troffic shifting to newRevisin
nase:nanuat-approval
type:suspend
name:rollout-rest
type:canary-rollout
propertles:
upgradeoll botches of component
batchPartition:1
traffic:
weightedTargets:
revision; reviews-v2
weight:188
#
168% shift to new version