Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I determine which ingress controllers are configured on Kubernetes

Is there a command I can run or is there some way to identify whether a cluster has one or more ingress controllers configured?

I'm not asking about the actual ingresses themselves (which I know can be found with kubectl get ingress --all-namespaces).

like image 657
Chris Stryczynski Avatar asked Oct 14 '25 04:10

Chris Stryczynski


1 Answers

There is no fancy way to achieve what you need. These two commands can help you and it really depends on what you need to choose between them.

$ kubectl get pods --all-namespaces -o=jsonpath='{range .items[*]}{"\n"}{.metadata.name}{":\t"}{range .metadata}{.labels}{", "}{end}{end}' | grep ingress | grep controller
$ kubectl get pods --show-labels --all-namespaces  | grep ingress | grep controller

Both commands are similar but with different outputs.

These commands are based on this documation page.

like image 169
Mark Watney Avatar answered Oct 16 '25 17:10

Mark Watney



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!