服务网格
AHS在导入集群的时候会自动安装服务治理插件 istiod,jaeger,kiali,prometheus,prometheus-adapt。 通过服务网格可以轻松实现灰度发布,流量治理,服务调用追踪。
# 背景知识
服务网格(Service Mesh)是致力于解决服务间通讯的基础设施层。它负责在现代云原生应用程序的复杂服务拓扑来可靠地传递请求。实际上,Service Mesh 通常是通过一组轻量级网络代理(Sidecar proxy),与应用程序代码部署在一起来实现,且对应用程序透明。
以下是 Linkerd 的 CEO Willian Morgan 给出的 Service Mesh 的定义:
A Service Mesh is a dedicated infrastructure layer for handling service-to-service communication. It’s responsible for the reliable delivery of requests through the complex topology of services that comprise a modern, cloud native application. In practice, the Service Mesh is typically implemented as an array of lightweight network proxies that are deployed alongside application code, without the application needing to be aware.
# 前提条件
集群开启服务网格(如何导入的时候没有选择服务网格,可以在插件组中选择安装)。
# 应用开启服务网格
1.创建应用。
2.为应用创建编排。
3.在可视化编排编辑器中,拖拽普通组件【server】至画布中。
4.点击上一步中的组件图标,填写组件名称:demo, 镜像: nginx。
5.在可视化编排编辑器左侧工具栏下滑,可以看到服务网格开关按钮,向右滑动开启服务网格。
6.保存并部署。
上一篇: 挂载存储 灰度发布