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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With