After recognized the message that "oc export" is deprecated and I should use "oc get --export" I tried it with the command "oc get --export scc/privileged" and get only the description of the scc that would appears also without the option --export
oc v3.10.14
kubernetes v1.10.0+b81c8f8
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server xxx:8443
openshift v3.10.14
kubernetes v1.10.0+b81c8f8
NAME PRIV CAPS SELINUX RUNASUSER FSGROUP SUPGROUP PRIORITY READONLYROOTFS VOLUMES
privileged true [*] RunAsAny RunAsAny RunAsAny RunAsAny <none> false [*]
allowHostDirVolumePlugin: true
allowHostIPC: true
allowHostNetwork: true
allowHostPID: true
allowHostPorts: true
allowPrivilegedContainer: true
allowedCapabilities:
- '*'
apiVersion: v1
defaultAddCapabilities: null
fsGroup:
type: RunAsAny
groups:
- system:cluster-admins
- system:nodes
- system:masters
kind: SecurityContextConstraints
metadata:
....
Update:
The challenge is not only for scc. I tried it also for user and deploymentconfig. Always the same issue
@openshift/sig-master @openshift/sig-security
This is expected. Only a few resources have a custom export strategy defined server-side.
For exporting resources it is ultimately better to export all of the data as-is (in a lossless manner), then modify the object at import-time with any specific changes that it needs.
cc @deads2k
That is correct, besides oc export is deprecated since 3.10 and is slated for removal in the next release. oc get --export is the only available option for now.
I understand your arguments, but in the OpenShift docs would be mentioned that I can export any information like in my example above. And that doesn't work with oc get --export. So the note that oc export is deprecated and I should use oc get --export is not correct!
And I'm wondering where then I can get the relevant information???
oc get <resource> -o yaml --export is all you need.
Closing based on discussion
Most helpful comment
oc get <resource> -o yaml --exportis all you need.