Description of problem: `oc export daemonset <DS_NAME>` and `oc get daemonset <DS_NAME> -o yaml` collects different data in ocp 3.7 compared to ocp 3.6 In 3.6, the only difference in the output from get and export is that get includes some additional metadata that export excludes. In 3.7, there is a good bit of differences, most importantly the field "kind: DaemonSet" is missing in export. Version-Release number of selected component (if applicable): # oc version oc v3.6.173.0.96 kubernetes v1.6.1+5115d708d7 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://openshift.internal.36metricstest.quicklab.rdu2.cee.redhat.com:443 openshift v3.6.173.0.96 kubernetes v1.6.1+5115d708d7 Compared to: # oc version oc v3.7.23 kubernetes v1.7.6+a08f5eeb62 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://openshift.internal.vault111.quicklab.rdu2.cee.redhat.com:443 openshift v3.7.23 kubernetes v1.7.6+a08f5eeb62 How reproducible: 100% Steps to Reproduce: 1. Setup any daemonset 2. oc export ds <DS_NAME> | grep -i kind 3. oc get ds <DS_NAME> -o yaml | grep -i kind Actual results: in 3.7: # oc export ds logging-fluentd | grep -i kind # oc get -o yaml ds logging-fluentd | grep -i kind kind: DaemonSet in 3.6: # oc export ds logging-fluentd | grep -i kind kind: DaemonSet # oc get -o yaml ds logging-fluentd | grep -i kind kind: DaemonSet Expected results: # oc export ds logging-fluentd | grep -i kind kind: DaemonSet # oc get -o yaml ds logging-fluentd | grep -i kind kind: DaemonSet
Agree with Maciej.
*** Bug 1553696 has been marked as a duplicate of this bug. ***
Checked in v3.7.44 env, oc export can work for ds, sts, deployment, hpa, etc, and the exported yaml files can work in `oc create -f`. However, deployment has one problem (ds, sts, hpa don't have): # oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/deployment/tc536600/hello-deployment-1.yaml While `oc export deploy`, `oc export deploy hello-openshift`, `oc export deployment/hello-openshift` work, with slash it has problem: # oc export deploy/hello-openshift error: apps/v1beta1, Kind=Deployment is unstructured and is not suitable for converting to "extensions/v1beta1" And with another flag --loglevel it can print yaml: round_trippers.go:405] GET https://localhost:8443/apis/extensions/v1beta1/namespaces/xxia-proj-2/deployments/hello-openshift 200 OK in 8 milliseconds I0417 05:03:20.100051 96586 exporter.go:249] No export strategy defined for objects of type *extensions.Deployment I0417 05:03:20.101835 96586 result.go:260] info: the output version specified is invalid. Defaulting to "v1beta1" apiVersion: extensions/v1beta1 kind: Deployment metadata: ...snipped..
I am unable to replicate the error seen in comment 9. I am using the 3.7.44 version of the client, against a 3.7 master. ``` $ oc version oc v3.7.44-1+6b061d4 kubernetes v1.7.6+a08f5eeb62 features: Basic-Auth Server https://127.0.0.1:8443 openshift v3.7.0+7ed6862 kubernetes v1.7.6+a08f5eeb62 ``` I am able to do `oc export deploy/hello-openshift`, `oc export deployment.extension/hello-openshift`, `oc export deploy hello-openshift`, `oc export deploy/hello-openshift`, etc. with no errors. What version of the server are you running against? Any chance you could provide access to a cluster that replicates the issue from comment 9? (or try with a newer / slightly older version of the client?)
A workaround for the deployments issue is to specify the group along with the resource kind: ``` $ oc export deploy.apps/hello-openshift ```