Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I list the ingresses that act on a Kubernetes service?

I'd like to retrieve all of the ingresses that act on a Kubernetes service.

I can get the ingresses in a namespace with the command kubectl get ingress -n <namespace>.

Is there a command in kubectl that lets me fetch the ingresses that act on a specific Kubernetes service?

like image 574
ktm5124 Avatar asked Feb 01 '26 21:02

ktm5124


1 Answers

To get all ingress rules in the cluster, you can run:

kubectl get ingress -A

To get a summary of all ingress rules (including their used services), you can run this:

kubectl describe ingress -A

To get the full ingress objects but in json format, you can run this:

kubectl get ingress -A -o json

You could then parse that json to get the used services.

like image 71
Sam Avatar answered Feb 03 '26 11:02

Sam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!