Kategorien
Allgemein

oc and go templates

Nice article to get going fishing information from oc output with go templates:

https://cloud.redhat.com/blog/customizing-oc-output-with-go-templates

More powerful than just using the yq tool, example is using conditions.

To test, use a Openshift Cluster like CRC.

Or, test with kubectl, as illustrated in https://kubernetes.io/docs/reference/kubectl/generated/kubectl_get/, you can specify –output=go-template –template=’….‘