Created
November 24, 2021 10:02
-
-
Save tanelmae/e7e80b93dff85a99baa7bf1b3d59f251 to your computer and use it in GitHub Desktop.
List ingresses with specific class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ingress-by-class() { | |
echo "Namespace >> Ingress name" | |
echo "-------------------------" | |
kubectl get ingresses \ | |
-o=jsonpath="{range .items[?(@.metadata.annotations.kubernetes\.io/ingress\.class==\"${1}\")]}{@.metadata.namespace}{\" >> \"}{@.metadata.name}{\"\n\"}{end}" --all-namespaces | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment