istio / istio.io

Source for the istio.io site
https://istio.io/
Apache License 2.0
762 stars 1.53k forks source link

Provide documentation for pilot debug API #12098

Open GregHanson opened 1 year ago

GregHanson commented 1 year ago

istiod has a number of debug API's available (defined here) but no documentation exists for them. Some are exposed via istioctl but not all. Would be great to include these API's in the docs

GregHanson commented 1 year ago

related to https://github.com/istio/istio/pull/41420

AndreaM12345 commented 1 year ago

clarification on how to invoke the istiod debug APIs

The API must be called like the following: kubectl exec -it deploy/istiod -n istio-system -- curl localhost:15014/debug/xxx

If trying exec into a pod first and making the curl cmd from within the pod to istiod then you will get an error with authorization.

Example of running the cmd and its output:

kubectl exec -it deploy/istiod -n istio-system -- curl localhost:15014/debug/list |jq
[
  "adsz",
  "adsz?push=true",
  "authorizationz",
  "cachez",
  "cachez?clear=true",
  "cachez?sizes=true",
  "clusterz",
  "config_distribution",
  "config_dump",
  "configz",
  "connections",
  "ecdsz",
  "edsz",
  "endpointShardz",
  "endpointz",
  "inject",
  "instancesz",
  "mcsz",
  "mesh",
  "ndsz",
  "networkz",
  "push_status",
  "pushcontext",
  "registryz",
  "resourcesz",
  "sidecarz",
  "syncz",
  "telemetryz"
]
AndreaM12345 commented 1 year ago

Just for clarification the request here is to create a page that would do the following: 1) Explain how to call the istiod api 2) List the debug options/paths and explain what each is providing

AndreaM12345 commented 1 year ago

link to how to create new doc pages https://preliminary.istio.io/latest/docs/releases/contribute/add-content/

GregHanson commented 1 year ago

Definitely a list.

A brief description would definitely help. Especially for similar sounding API's like edsz/endpointz/endpointShardz. For instance, any endpoints in StrictDNS envoy CDS clusters - those endpoints will not appear in some of the output since they are listed in CDS, not EDS

GregHanson commented 1 year ago

istioctl uses port forwarding , not sure which is the preferred method for the docs

Amshu-k commented 1 year ago

@AndreaM12345 - thank you for your assistance. @GregHanson - can you please assign this issue to me?