一、概述

测试环境已经跑了很长时间的istio了,也更新到了最新的istio-1.1。性能相较之前提升很大,官方给出的测试数据说是延迟降低到了8ms,但是实际测试确实访问速度有很大的提升,但是确实还是比直接访问pod速度差异很明显,sidecar的引入使数据流向变得层数更多,导致访问性能上的一些损耗。总结下来的使用建议就是不要盲目的使用service-mesh,服务网格是解决了很多问题,但同时也带来很多新的问题。但是istio的pilot和mixer还是可以用的。具体详细的istio介绍直接参考官网:https://istio.io/docs/concepts/what-is-istio/

二、部署

参考GitHub上的install,然后我这里根据自己的使用做了一份,只是定制了一下values文件,没有做很大的修改。

https://github.com/cuishuaigit/istio-chart

这里使用的是istio的自动注入,所以需要设置一下namespace的label:

kubectl  label namespace default  istio-injection=enabled

首先是部署helm,现在最新版本的helm:https://github.com/helm/helm/releases

wget  https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-linux-amd64.tar.gz

创建serviceaccount

kubectl create helm-service-account.yaml

安装tiller

helm  init --service-account tiller

生产使用都是TLS的:

参考https://helm.sh/docs/using_helm/#using-ssl-between-helm-and-tiller

istio的安装参考我github的README。

安装完的效果:

root@k3-:/data/appswitch# kubectl get pods -n istio-system
NAME READY STATUS RESTARTS AGE
grafana-5758685b-9qk5z / Running 4d8h
istio-citadel-5f88c9b4-wwz2d / Running 4d8h
istio-galley-689b8d98-c5pw8 / Running 4d8h
istio-ingressgateway-744855f4-x8jkl / Running 4d7h
istio-init-crd--68cgn / Completed 4d8h
istio-init-crd--fsb6w / Completed 4d8h
istio-init-crd-certmanager--64btr / Completed 4d8h
istio-init-crd-certmanager--8qzrg / Completed 4d8h
istio-pilot-6cd56bb6cb-6t78m / Running 4d8h
istio-policy--lsfxt / Running 4d7h
istio-sidecar-injector-746b458c-6rbdz / Running 4d8h
istio-telemetry-77b97547-2pdpq / Running 4d7h
istio-telemetry-77b96547-8gmd8 / Running 4d7h
istio-tracing-656fc99c-xggq8 / Running 4d8h
istiocoredns-bd4885d-x9hwt / Running 4d8h
kiali-69d68b45-2sxzj / Running 4d4h
prometheus-66f5694-bn622 / Running 4d8h
servicegraph-759c7d9b-sjdfg / Running 4d8h
tiller-deploy-556f6dd9-jhpt4 / Running 6d6h

三、使用

四、Appswitch

istio存在代理多层的问题,还有就是Envoy代理延时设置的问题,考虑引入Appswitch可以将这些层都删减掉,引入一个说明图(侵删),同时appswitch也能解决k8s的跨网段通信问题。

appswitch测试demo:

以daemonset的方式部署Appswitch:

git  clone https://github.com/cuishuaigit/appswitch.git

kubectl apply -f appswitch.yaml
root@ku13-:~# ax get nodes
NAME CLUSTER IP EXTERNALIP ROLE APPCOUNT
-----------------------------------------------------------------
ku13- cluster0 10.1.80.149 [compute]
ku13- cluster0 10.2.68.77 [compute]
ku13- cluster0 10.2.73.110 [compute]
ku13- cluster0 10.2.83.248 [compute]

部署nginx-demo:

kubectl  apply -f  nginx-demo.yaml

访问:

root@k3-:/data/appswitch# ax get vservices
VSNAME VSTYPE VSIP VSPORTS VSBACKENDIPS VSAPPIDS
----------------------------------------------------------------------------------------------
nginx-demo Random 1.1.1.1 [{ }] [] [30d2f4g1--4d95-bcvc-6c785c9f0237]
root@k3-:/data/appswitch# ax run -- curl -I nginx-demo
HTTP/1.1 OK
Server: nginx/1.15.
Date: Mon, Apr :: GMT
Content-Type: text/html
Content-Length:
Last-Modified: Tue, Mar :: GMT
Connection: keep-alive
ETag: "5c9a3176-264"
Accept-Ranges: bytes

跨网段访问:

root@ku13-:~# ax run -- curl -I nginx-demo
HTTP/1.1 OK
Server: nginx/1.15.
Date: Tue, Apr :: GMT
Content-Type: text/html
Content-Length:
Last-Modified: Tue, Apr :: GMT
Connection: keep-alive
ETag: "5cac8013-264"
Accept-Ranges: bytes

参考:

http://appswitch.io/blog/kubernetes_istio_and_network_function_devirtualization_with_appswitch/

https://appswitch.readthedocs.io/en/latest/reading.html

https://appswitch.readthedocs.io/en/latest/integrations.html

https://istio.io/blog/2018/delayering-istio/

https://github.com/cuishuaigit/appswitch

istio小结的更多相关文章

  1. Istio如何使用相同的端口访问网格外服务

    1.1.背景 写这篇文章的目的是为了说明以下问题:如何使用TCP协议相同的端口访问网格外多个服务? 这是最近直播的时候有一个同学提出的,当时我没有完全明白,“访问多集群” 的意思.后来仔细思考了一下, ...

  2. Istio流量管理实现机制深度解析

    https://zhaohuabing.com/post/2018-09-25-istio-traffic-management-impl-intro/TOC 前言 Pilot高层架构 统一的服务模型 ...

  3. 使用Istio治理微服务入门

    近两年微服务架构流行,主流互联网厂商内部都已经微服务化,初创企业虽然技术积淀不行,但也通过各种开源工具拥抱微服务.再加上容器技术赋能,Kubernetes又添了一把火,微服务架构已然成为当前软件架构设 ...

  4. 【译文连载】 理解Istio服务网格(第七章 安全)

    全书目录 第一章 概述 第二章 安装 第三章 流控 第四章 服务弹性 第五章 混沌测试 第六章 可观测性 本文目录 第7章 安全 7.1 身份认证 7.1.1 Kubernetes上的Istio的身份 ...

  5. Istio 流量劫持过程

    开篇 Istio 流量劫持的文章其实目前可以在servicemesher社区找到一篇非常详细的文章,可查阅:Istio 中的 Sidecar 注入及透明流量劫持过程详解.特别是博主整理的那张" ...

  6. Istio 运维实战系列(1):应用容器对 Envoy Sidecar 的启动依赖问题

    本系列文章将介绍用户从 Spring Cloud,Dubbo 等传统微服务框架迁移到 Istio 服务网格时的一些经验,以及在使用 Istio 过程中可能遇到的一些常见问题的解决方法. 故障现象 该问 ...

  7. Istio 运维实战系列(2):让人头大的『无头服务』-上

    本系列文章将介绍用户从 Spring Cloud,Dubbo 等传统微服务框架迁移到 Istio 服务网格时的一些经验,以及在使用 Istio 过程中可能遇到的一些常见问题的解决方法. 什么是『无头服 ...

  8. 在 Istio 中实现 Redis 集群的数据分片、读写分离和流量镜像

    Redis 是一个高性能的 key-value 存储系统,被广泛用于微服务架构中.如果我们想要使用 Redis 集群模式提供的高级特性,则需要对客户端代码进行改动,这带来了应用升级和维护的一些困难.利 ...

  9. 如何在 Istio 中支持 Dubbo、Thrift、Redis 以及任何七层协议?

    赵化冰,腾讯云高级工程师,Istio Member,ServiceMesher管理委员,Istio 项目贡献者, Aerika 项目创建者 ,热衷于开源.网络和云计算.目前主要从事服务网格的开源和研发 ...

随机推荐

  1. Codeforces Educational Codeforces Round 44 (Rated for Div. 2) E. Pencils and Boxes

    Codeforces Educational Codeforces Round 44 (Rated for Div. 2) E. Pencils and Boxes 题目连接: http://code ...

  2. 怎么解决syntaxerror:non-utf-8 code starting with \xc4'in file

    怎么解决syntaxerror:non-utf-8 code starting with \xc4'in file   首行增加,已测试可用. # coding=gbk   程序中出现中文,运行的时候 ...

  3. 登陆页、注册页、会员中心页logo图的替换

                  关闭   PHP在线开发笔记       目录视图 摘要视图 订阅 异步赠书:9月重磅新书升级,本本经典           程序员9月书讯      每周荐书:ES6.虚 ...

  4. UE4物理动画使用

    Rigid Body Body的创建. 对重要骨骼创建Body,保证Body控制的是表现和变化比较大的骨骼. 需要对Root创建Body并绑定,设置为Kinematic且不启用物理.原因是UPrimi ...

  5. Docker构建其它组件

    构建mysql 运行centos7容器 docker run --privileged -dti --name=centos-container centos:7 /usr/sbin/init 查询c ...

  6. HDU5818 Joint Stacks

    Joint Stacks                                                                       Time Limit: 8000/ ...

  7. 转:酷我音乐API

    酷我音乐API 本次分析的是酷我音乐API 歌曲搜索API:http://search.kuwo.cn/r.s?all={0}&ft=music&itemset=web_2013&am ...

  8. 下载安装配置Maven

    下载安装Apache Maven 1.Maven官网下载jia包:http://maven.apache.org/download.cgi 2.将文件解压到D:\Program Files\apach ...

  9. 00SQL表字段说明

    SELECT d.name 表名 , a.colorder 字段序号 , a.name 字段名 , ISNULL(g.[value], '') AS 字段说明 , ( CASE WHEN COLUMN ...

  10. 【备忘】ASP.NET MVC 5 升级到 ASP.NET Core MVC 的部分变化

    正在将一个 .net 4.5 的项目(MVC 5)升级到 .net core 2.1,中间遇到了许多的修改,记在下面,帮大家少走弯路. System.Drawing 下面很多类已经不存在(如Bitma ...