envoy 部署及配置详解


1,在基于 RPM 的发行版上安装 Envoy

1.官方地址:
https://www.envoyproxy.io/docs/envoy/latest/start/install#install

#Install Envoy on RPM-based distros
sudo yum install yum-utils
sudo rpm --import 'https://rpm.dl.getenvoy.io/public/gpg.CF716AF503183491.key'
curl -sL 'https://rpm.dl.getenvoy.io/public/config.rpm.txt?distro=el&codename=7' > /tmp/tetrate-getenvoy-rpm-stable.repo
sudo yum-config-manager --add-repo '/tmp/tetrate-getenvoy-rpm-stable.repo'
sudo yum makecache --disablerepo='*' --enablerepo='tetrate-getenvoy-rpm-stable'
sudo yum install getenvoy-envoy

2.查看版本
]# envoy --version

envoy  version: d362e791eb9e4efa8d87f6d878740e72dc8330ac/1.18.2/clean-getenvoy-76c310e-envoy/RELEASE/BoringSSL


3.配置文件检查:
]# envoy --mode validate -c envoy-demo.yaml 
[2022-03-04 10:24:57.502][6242][info][main] [external/envoy/source/server/server.cc:667] runtime: layers:
  - name: base
    static_layer:
      {}
  - name: admin
    admin_layer:
      {}
[2022-03-04 10:24:57.502][6242][info][config] [external/envoy/source/server/configuration_impl.cc:128] loading tracing configuration
[2022-03-04 10:24:57.502][6242][info][config] [external/envoy/source/server/configuration_impl.cc:88] loading 0 static secret(s)
[2022-03-04 10:24:57.502][6242][info][config] [external/envoy/source/server/configuration_impl.cc:94] loading 1 cluster(s)
[2022-03-04 10:24:57.503][6242][info][config] [external/envoy/source/server/configuration_impl.cc:98] loading 1 listener(s)
[2022-03-04 10:24:57.505][6242][info][config] [external/envoy/source/server/configuration_impl.cc:110] loading stats configuration
configuration 'envoy-demo.yaml' OK

4.添加启动日志
mkdir logs
envoy -c envoy-demo.yaml --log-path logs/custom.log



#官方参考示例配置:
https://github.com/envoyproxy/envoy/tree/main/examples

#其他参考
https://www.servicemesher.com/envoy/intro/arch_overview/redis.html
https://blog.gmem.cc/envoy-study-note

安装插件方便排错


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM