Last active
January 29, 2025 21:26
-
-
Save sudhirpandey/d13baf9bdaeb5f50db73d123e1197eb7 to your computer and use it in GitHub Desktop.
openshift command line with Go templating and others
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
| #To get all the projects | |
| `oc get projects -o name |xargs -i oc get {} --template '{{ .metadata.name }}{{"\n"}}` | |
| #To get all the routes | |
| `oc get projects -o name |xargs -i oc get {} --template '{{ .metadata.name }}{{"\n"}}'|xargs -i oc get routes --template '{{range .items}}{{ .spec.host}}{{"\n"}}{{end}}' -n {}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment