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
).
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.
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