Created
December 5, 2018 10:45
-
-
Save flavianmissi/6915a0bedee4cdf215ef77a4a9efc033 to your computer and use it in GitHub Desktop.
compare k8s endpoints against ingress configured service names
This file contains hidden or 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
INGRESS=my-nginx | |
kubectl get endpoints -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'|sort | |
kubectl get ing ${INGRESS} -o=jsonpath='{range .spec.rules[*]}{range .http.paths[*]}{.backend.serviceName}{"\n"}{end}{end}'|sort | |
#see in vimdiff | |
vimdiff <(kubectl get endpoints -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'|sort) <(kubectl get ing ${INGRESS} -o=jsonpath='{range .spec.rules[*]}{range .http.paths[*]}{.backend.serviceName}{"\n"}{end}{end}'|sort) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment