linkerd1.6 local安装方式文档

系统

[root@i-vzdytl5t ~]# uname -a 
Linux i-vzdytl5t 3.10.0-862.3.2.el7.x86_64 #1 SMP Mon May 21 23:36:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@i-vzdytl5t ~]# cat /etc/redhat-release 
CentOS Linux release 7.5.1804 (Core) 

1.安装jdk

jdk下载链接请前往oralce jdk
必须是jdk8.0以上

本环境的jdk版本是1.8.0_144

[root@i-vzdytl5t ~]# java -version 
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

2.下载linkerd
下载链接 linkerd 1.6 releases

wget https://github.com/linkerd/linkerd/releases/download/1.6.0/linkerd-1.6.0.tgz

解压

tar -xzf linkerd-1.6.0.tgz
cd linkerd-1.6.0

linkerd1.6 local安装方式文档_第1张图片
重命名linkerd-1.6.0-exec

mv linkerd-1.6.0-exec linkerd

修改配置文件

[root@i-vzdytl5t linkerd-1.6.0]# cat config/linkerd.yaml 
admin:
  port: 9990
  ip: 0.0.0.0 //添加这一行

namers:
- kind: io.l5d.fs
  rootDir: disco

routers:
- protocol: http
  dtab: |
    /svc => /#/io.l5d.fs;
  httpAccessLog: logs/access.log
  label: int
  servers:
  - port: 4140
    ip: 0.0.0.0

- protocol: thrift
  label: /host/thrift-framed
  thriftProtocol: binary
  dtab: |
    /host => /#/io.l5d.fs;
    /svc  => /host/thrift-framed;
  client:
    thriftFramed: true
  servers:
  - port: 4141
    ip: 0.0.0.0
    thriftFramed: true

- protocol: thrift
  label: /host/thrift-buffered
  thriftProtocol: compact
  dtab: |
    /host => /#/io.l5d.fs;
    /svc  => /host/thrift-buffered;
  client:
    thriftFramed: false
  servers:
  - port: 4142
    ip: 0.0.0.0
    thriftFramed: false

运行

./linkerd config/linkerd.yaml

linkerd1.6 local安装方式文档_第2张图片

查看管理界面,访问10.39.43.117:9990
linkerd1.6 local安装方式文档_第3张图片

用python启动一个监听9999端口的服务
linkerd1.6 local安装方式文档_第4张图片
验证python服务是否正常
dd
验证linkerd的功能
linkerd1.6 local安装方式文档_第5张图片
理解路由生成规则

linkerd1.6 local安装方式文档_第6张图片
具体实现机制请查看linkerd的路由机制

接下来自定义一个router
服务发现目录
linkerd1.6 local安装方式文档_第7张图片
进入disco文件夹

cd disco

linkerd1.6 local安装方式文档_第8张图片
在目录disco生成文件test
内容为:

[root@i-vzdytl5t disco]# cat test 
127.0.0.1 9999

重启之后验证配置是否成功
9999
查看服务监听的端口
linkerd1.6 local安装方式文档_第9张图片

发请求之后查看dashboard管理界面就能看到相关的信息
linkerd1.6 local安装方式文档_第10张图片
end
参考:
官方文档

你可能感兴趣的:(kubetnetes)