Skip to content

Instantly share code, notes, and snippets.

@WanLinLin
Last active July 28, 2022 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WanLinLin/21c718f0ad77471f5c0e407e7faf8173 to your computer and use it in GitHub Desktop.
Save WanLinLin/21c718f0ad77471f5c0e407e7faf8173 to your computer and use it in GitHub Desktop.
# list ingress host and paths, ref https://www.kaper.com/cloud/find-kubernetes-ingress-rules/
kubectl get ingress -o json | \
jq -r '.items[] | . as $parent | .spec.rules[] | select(.host=="HOST.NAME.YOU.WANT") | .host as $host | .http.paths[] | ( $host + " " + .path + " " + .backend.service.name + " " + $parent.metadata.name )' | \
sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment