绿色设计网站,网站建设相关合同内容,网站开发模,wordpress html5代码包1. 问题描述及原因分析
在部署Prometheus、Grafana、Zipkin、Kiali监控度量Istio的第2.2章节#xff0c;部署nginx应用#xff0c;创建的pod并没有产生Envoy sidecar代理#xff0c;仅有一个应用容器运行中 故在随后的prometheus中也没有产生指标istio_requests_total。通…1. 问题描述及原因分析
在部署Prometheus、Grafana、Zipkin、Kiali监控度量Istio的第2.2章节部署nginx应用创建的pod并没有产生Envoy sidecar代理仅有一个应用容器运行中 故在随后的prometheus中也没有产生指标istio_requests_total。通过查阅相关资料为Sidecar 自动注入问题。
部署应用时手工Sidecar注入命令
kubectl apply -f(istioctl kube-inject -f nginx.yaml)成功产生了Envoy sidercar代理通过网页访问Nignx服务然后再查看Prometheus产生了istio_requests_total指标。 还有一种方案在namespace设置自动注入
kubectl label namespace default istio-injectionenabled若报error: ‘istio-injection’ already has a value (enabled), and --overwrite is false加上参数–overwritetrue
kubectl get namespace -L istio-injection再次创建应用成功生成envoy sidecar代理。 2. 解决方案
方案1手工Sidecar注入命令
kubectl apply -f(istioctl kube-inject -f nginx.yaml)方案2在namespace设置自动注入
kubectl label namespace default istio-injectionenabled3.参考文献
https://istio.io/latest/zh/docs/ops/common-problems/injection/ https://www.cnblogs.com/lvcisco/p/10813578.html https://blog.csdn.net/xiecj_2006/article/details/82714328 https://www.cnblogs.com/guyouyin123/p/15592446.html