Ooh, good answer. I was thinking more along the lines of something that kubectl provided natively, but json output plus the jq parser (which I love and use all the time) definitely fits the bill.

Along those lines, I've been using a more low-tech/hacky version up till now:

kubectl describe ing | grep "        /"

Thanks,

DR

On 04/13/2018 04:28 AM, 'Timo Reimann' via Kubernetes user discussion and Q&A wrote:
I tend to struggle with jsonpath, so here's my jq-based suggestion:

$ kubectl get ing -o json | jq -r '.items[].spec.rules[].http.paths[]'

This yields a structure like

{
   "backend": {
     "serviceName": "service-foo",
     "servicePort": 80
   },
   "path": "/service-foo/path"
}
{
   "backend": {
     "serviceName": "service-bar",
     "servicePort": 443
   },
   "path": "/service-bar/path"
}

for me. You can tweak the jq expression for extra slicing and dicing.

HTH

Timo


On Thursday, April 12, 2018 at 5:26:36 PM UTC+2, David Rosenstrauch wrote:

Is there any way to produce a comprehensive list of all the paths that
are defined in the ingress controller?  (And all the services they map
to.)

The closest thing I've found is:

kubectl describe ing

But that generates a lot of verbose output.

Thanks,

DR



--
You received this message because you are subscribed to the Google Groups "Kubernetes 
user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
  • [kubernetes-user... David Rosenstrauch
    • [kubernetes... 'Timo Reimann' via Kubernetes user discussion and Q&A
      • Re: [ku... David Rosenstrauch
        • Re:... 'Timo Reimann' via Kubernetes user discussion and Q&A

Reply via email to