引子
许久不见,istioctl
中加入了很多有趣的新命令。装备党天然是喜欢小工具了,选几个有趣的命令分享给你们。微信
Analyze
Istio 的配置是比较繁杂的,相信玩过的朋友都比较有体会,istioctl x analyze
,能够对 Istio 进行一些检查,架构
目前该工具支持的检测范围包括:app
IST0001:ide
内部错误,基本上是属于实现部分的 Bug。工具
IST0002:性能
对象中存在过时特性。spa
IST0101:.net
应用对象不存在,例若有 VirtualService 无 Workload。rest
IST0102:code
命名空间未开启自动注入。
IST0103:
有 Pod 没有注入 Istio Proxy。
IST0104:
网关端口没有工做负载。
IST0105:
Sidecar 版本和 Istio 版本不一致。
IST0106:
文件格式错误。
IST0107:
注解目标错误。
IST0108:
未知注解。
IST0109:
网关内 VirtualService 主机名冲突。
IST0110:
Sidecar 对象选择器重叠。
IST0111:
多于一个 Sidecar 对象没有负载选择器。
IST0112:
多端口服务的 VirtualService 缺少选择。
例如:
$ istioctl x analyze -k
Warn [IST0103] (Pod httpbin-7d9d5b55b9-jslpp.default) The pod is missing its Istio proxy. Run 'kubectl delete pod httpbin-
7d9d5b55b9-jslpp -n default' to restart it
Error: Analyzer found issues.
Dashboard
多是向 Linkerd 致敬?
打开 Istio 的各类仪表盘页面:
controlz:
打开指定控制平面组件的
ctrlz
界面。envoy:
打开特定 Pod 的 Envoy 仪表盘
grafana:
缺省 Grafana 页面
jaeger、kiali、zipkin 和 Prometheus 页面
Metrics
查看指定服务的性能指标:
整体 RPS
错误 RPS
P50 延迟
P90 延迟
P99 延迟
Manifest
用于生成或安装 Istio 清单,例如推荐的安装方式:istioctl manifest apply --set profile=demo
Profile
几个内置的安装配置,用于 Manifest 命令的 set profile
,其中包含:
minimal
remote
sds
default
demo
Describe
根据 Pod 和 Service,获取相关的配置内容,例如:
$ istioctl x describe service httpbin
Service: httpbin
Port: http 8000/HTTP targets pod port 80
Pod is PERMISSIVE, client protocol unspecified
VirtualService: httpbin
1 HTTP route(s)
本文分享自微信公众号 - 伪架构师(fake-architect)。
若有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一块儿分享。