Istio pilot 发现 http api 文件?
Istio pilot discovery http api documents?
pilot发现暴露了http服务,但是上面没有文档。我如何通过 pilot api 进行查询,例如列出所有已注册的服务?
刚刚找到相关文档和代码:
调试界面:
https://github.com/istio/istio/tree/master/pilot/pkg/proxy/envoy/v2
PILOT=istio-pilot.istio-system:9093
# What is sent to envoy
# Listeners and routes
curl $PILOT/debug/adsz
# Endpoints
curl $PILOT/debug/edsz
# Clusters
curl $PILOT/debug/cdsz
# General metrics
curl $PILOT/metrics
# All services/external services from all registries
curl $PILOT/debug/registryz
# All endpoints
curl $PILOT/debug/endpointz[?brief=1]
# All configs.
curl $PILOT/debug/configz
列出所有端点:
/v1/registration
https://github.com/istio/istio/blob/master/pilot/pkg/proxy/envoy/discovery.go#L141
pprof
/debug/pprof/
healthz
/ready
mux.HandleFunc("/debug/edsz", s.edsz)
mux.HandleFunc("/debug/adsz", s.adsz)
mux.HandleFunc("/debug/cdsz", cdsz)
mux.HandleFunc("/debug/syncz", Syncz)
mux.HandleFunc("/debug/registryz", s.registryz)
mux.HandleFunc("/debug/endpointz", s.endpointz)
mux.HandleFunc("/debug/endpointShardz", s.endpointShardz)
mux.HandleFunc("/debug/workloadz", s.workloadz)
mux.HandleFunc("/debug/configz", s.configz)
mux.HandleFunc("/debug/authenticationz", s.authenticationz)
mux.HandleFunc("/debug/config_dump", s.ConfigDump)
mux.HandleFunc("/debug/push_status", s.PushStatusHandler)
我像这样使用它并且有效。在 istio 1.7
上测试
连接到 istiod:
kubectl exec -ti < istiod-pod-name > -c discovery -n istio-system -- /bin/bash
运行 飞行员发现命令:
pilot-discovery request get metrics | grep citadel
pilot发现暴露了http服务,但是上面没有文档。我如何通过 pilot api 进行查询,例如列出所有已注册的服务?
刚刚找到相关文档和代码:
调试界面:
https://github.com/istio/istio/tree/master/pilot/pkg/proxy/envoy/v2
PILOT=istio-pilot.istio-system:9093
# What is sent to envoy
# Listeners and routes
curl $PILOT/debug/adsz
# Endpoints
curl $PILOT/debug/edsz
# Clusters
curl $PILOT/debug/cdsz
# General metrics
curl $PILOT/metrics
# All services/external services from all registries
curl $PILOT/debug/registryz
# All endpoints
curl $PILOT/debug/endpointz[?brief=1]
# All configs.
curl $PILOT/debug/configz
列出所有端点: /v1/registration
https://github.com/istio/istio/blob/master/pilot/pkg/proxy/envoy/discovery.go#L141
pprof
/debug/pprof/
healthz
/ready
mux.HandleFunc("/debug/edsz", s.edsz)
mux.HandleFunc("/debug/adsz", s.adsz)
mux.HandleFunc("/debug/cdsz", cdsz)
mux.HandleFunc("/debug/syncz", Syncz)
mux.HandleFunc("/debug/registryz", s.registryz)
mux.HandleFunc("/debug/endpointz", s.endpointz)
mux.HandleFunc("/debug/endpointShardz", s.endpointShardz)
mux.HandleFunc("/debug/workloadz", s.workloadz)
mux.HandleFunc("/debug/configz", s.configz)
mux.HandleFunc("/debug/authenticationz", s.authenticationz)
mux.HandleFunc("/debug/config_dump", s.ConfigDump)
mux.HandleFunc("/debug/push_status", s.PushStatusHandler)
我像这样使用它并且有效。在 istio 1.7
上测试连接到 istiod:
kubectl exec -ti < istiod-pod-name > -c discovery -n istio-system -- /bin/bash
运行 飞行员发现命令:
pilot-discovery request get metrics | grep citadel