Created
January 8, 2023 22:13
-
-
Save umutbasal/8444b5e33090395b1fcaf61b8a09700d to your computer and use it in GitHub Desktop.
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
| kubectl get pods -A -o json | jq -r '.items[] | "\(.metadata.name) \(.metadata.namespace) \(.spec.containers[]?.ports[]?.containerPort)"' | awk '{print $1"."$2".svc.cluster.local:"$3}' | grep -v null | |
| kubectl get svc -A -o json | jq -r '.items[] | "\(.metadata.name) \(.metadata.namespace) \(.spec.ports[]?.port)"' | awk '{print $1"."$2".svc.cluster.local:"$3}' | grep -v null | |
| kubectl get endpoints -A -o json | jq -r '.items[] | "\(.metadata.name) \(.metadata.namespace) \(.subsets[]?.ports[]?.port)"' | awk '{print $1"."$2".svc.cluster.local:"$3}' | grep -v null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment