I want export openshift resource defination like CRD YAML file, which import to k8s api server.
oc get crd project.openshift.io -o yaml > project_crd.yaml
kubectl apply -f project_crd.yaml
You need to specify output format:
oc get crd $WHATEVER -o yaml > savedcrd.yaml